mirror of
https://github.com/Azure/setup-helm.git
synced 2026-04-05 06:16:55 +00:00
Added helm binary to the Path environment variable
This commit is contained in:
parent
11c996f4c7
commit
fe2c706cad
4 changed files with 24 additions and 3 deletions
11
src/run.ts
11
src/run.ts
|
|
@ -114,6 +114,17 @@ async function run() {
|
|||
}
|
||||
|
||||
let cachedPath = await downloadHelm(version);
|
||||
|
||||
try {
|
||||
|
||||
if (!process.env['PATH'].startsWith(path.dirname(cachedPath))) {
|
||||
core.addPath(path.dirname(cachedPath));
|
||||
}
|
||||
}
|
||||
catch {
|
||||
//do nothing, set as output variable
|
||||
}
|
||||
|
||||
console.log(`Helm tool version: '${version}' has been cached at ${cachedPath}`);
|
||||
core.setOutput('helm-path', cachedPath);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue