Resolving PR comments
This commit is contained in:
parent
5e422a4552
commit
16b0d2e20d
2 changed files with 3 additions and 18 deletions
|
@ -75,14 +75,7 @@ function run() {
|
|||
version = yield getStableKubectlVersion();
|
||||
}
|
||||
let cachedPath = yield downloadKubectl(version);
|
||||
try {
|
||||
if (!process.env['PATH'].startsWith(path.dirname(cachedPath))) {
|
||||
core.addPath(path.dirname(cachedPath));
|
||||
}
|
||||
}
|
||||
catch (_a) {
|
||||
//do nothing, set as output variable
|
||||
}
|
||||
core.addPath(path.dirname(cachedPath));
|
||||
console.log(`Kubectl tool version: '${version}' has been cached at ${cachedPath}`);
|
||||
core.setOutput('kubectl-path', cachedPath);
|
||||
});
|
||||
|
|
10
src/run.ts
10
src/run.ts
|
@ -71,15 +71,7 @@ async function run() {
|
|||
}
|
||||
let cachedPath = await downloadKubectl(version);
|
||||
|
||||
try {
|
||||
|
||||
if (!process.env['PATH'].startsWith(path.dirname(cachedPath))) {
|
||||
core.addPath(path.dirname(cachedPath));
|
||||
}
|
||||
}
|
||||
catch {
|
||||
//do nothing, set as output variable
|
||||
}
|
||||
core.addPath(path.dirname(cachedPath));
|
||||
|
||||
console.log(`Kubectl tool version: '${version}' has been cached at ${cachedPath}`);
|
||||
core.setOutput('kubectl-path', cachedPath);
|
||||
|
|
Loading…
Add table
Reference in a new issue