Skip to content

Commit 2f25f49

Browse files
authored
Sending a warning instead of throwing error when KUBECONFIG is missing. (#145)
1 parent bba73cd commit 2f25f49

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/run.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function installKubectl(version) {
5353
}
5454
function checkClusterContext() {
5555
if (!process.env["KUBECONFIG"]) {
56-
throw new Error('Cluster context not set. Use k8ssetcontext action to set cluster context');
56+
core.warning('KUBECONFIG env is not explicitly set. Ensure cluster context is set by using k8s-set-context / aks-set-context action.');
5757
}
5858
}
5959
function run() {

src/run.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async function installKubectl(version: string) {
4242

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

0 commit comments

Comments
 (0)