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

This commit is contained in:
Koushik Dey 2021-08-17 16:39:38 +05:30 committed by GitHub
parent acd12a4705
commit 33608d18f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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