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();
|
version = yield getStableKubectlVersion();
|
||||||
}
|
}
|
||||||
let cachedPath = yield downloadKubectl(version);
|
let cachedPath = yield downloadKubectl(version);
|
||||||
try {
|
core.addPath(path.dirname(cachedPath));
|
||||||
if (!process.env['PATH'].startsWith(path.dirname(cachedPath))) {
|
|
||||||
core.addPath(path.dirname(cachedPath));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (_a) {
|
|
||||||
//do nothing, set as output variable
|
|
||||||
}
|
|
||||||
console.log(`Kubectl tool version: '${version}' has been cached at ${cachedPath}`);
|
console.log(`Kubectl tool version: '${version}' has been cached at ${cachedPath}`);
|
||||||
core.setOutput('kubectl-path', cachedPath);
|
core.setOutput('kubectl-path', cachedPath);
|
||||||
});
|
});
|
||||||
|
|
12
src/run.ts
12
src/run.ts
|
@ -71,16 +71,8 @@ async function run() {
|
||||||
}
|
}
|
||||||
let cachedPath = await downloadKubectl(version);
|
let cachedPath = await downloadKubectl(version);
|
||||||
|
|
||||||
try {
|
core.addPath(path.dirname(cachedPath));
|
||||||
|
|
||||||
if (!process.env['PATH'].startsWith(path.dirname(cachedPath))) {
|
|
||||||
core.addPath(path.dirname(cachedPath));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch {
|
|
||||||
//do nothing, set as output variable
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(`Kubectl tool version: '${version}' has been cached at ${cachedPath}`);
|
console.log(`Kubectl tool version: '${version}' has been cached at ${cachedPath}`);
|
||||||
core.setOutput('kubectl-path', cachedPath);
|
core.setOutput('kubectl-path', cachedPath);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue