Sending a warning instead of throwing error when KUBECONFIG is missing. (#145)

This commit is contained in:
Koushik Dey 2021-08-17 16:39:17 +05:30 committed by GitHub
parent bba73cd11a
commit 2f25f49dce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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() {

View File

@ -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.');
}
}