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 b827389349
2 changed files with 2 additions and 2 deletions
+1 -1
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() {
+1 -1
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.');
}
}