omit namespace arg for default namespace (#195)

This commit is contained in:
David Gamero
2022-06-15 10:01:20 -04:00
committed by GitHub
parent 507f2d4fc7
commit 15920eb094
4 changed files with 55 additions and 26 deletions
+3 -2
View File
@@ -147,8 +147,9 @@ export class Kubectl {
if (this.ignoreSSLErrors) {
args.push("--insecure-skip-tls-verify");
}
args = args.concat(["--namespace", this.namespace]);
if (this.namespace && this.namespace != "default") {
args = args.concat(["--namespace", this.namespace]);
}
core.debug(`Kubectl run with command: ${this.kubectlPath} ${args}`);
return await getExecOutput(this.kubectlPath, args, { silent });
}