Skip to content

Commit

Permalink
Sending a warning instead of throwing error when KUBECONFIG is missin…
Browse files Browse the repository at this point in the history
…g. (#146)
  • Loading branch information
koushdey authored Aug 17, 2021
1 parent d1dd574 commit 8249ba5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function installKubectl(version) {
}
function checkClusterContext() {
if (!process.env["KUBECONFIG"]) {
throw new Error('Cluster context not set. Use k8ssetcontext action to set cluster context');
core.warning('KUBECONFIG env is not explicitly set. Ensure cluster context is set by using k8s-set-context / aks-set-context action.');
}
}
function run() {
Expand Down
2 changes: 1 addition & 1 deletion src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function installKubectl(version: string) {

function checkClusterContext() {
if (!process.env["KUBECONFIG"]) {
throw new Error('Cluster context not set. Use k8ssetcontext action to set cluster context');
core.warning('KUBECONFIG env is not explicitly set. Ensure cluster context is set by using k8s-set-context / aks-set-context action.');
}
}

Expand Down

0 comments on commit 8249ba5

Please sign in to comment.