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. (#141)
  • Loading branch information
koushdey authored Jul 27, 2021
1 parent ec2a943 commit c8fbd76
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 c8fbd76

Please sign in to comment.