Skip to content

Commit

Permalink
Adding tool binaries to PATH (#4) (#5)
Browse files Browse the repository at this point in the history
* Adding tool binaries to PATH

* Resolving PR comments
  • Loading branch information
shigupt202 authored Jun 8, 2020
1 parent 4b33fbc commit 861c756
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/run.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Expand Down Expand Up @@ -74,6 +75,7 @@ function run() {
version = yield getStableKubectlVersion();
}
let cachedPath = yield downloadKubectl(version);
core.addPath(path.dirname(cachedPath));
console.log(`Kubectl tool version: '${version}' has been cached at ${cachedPath}`);
core.setOutput('kubectl-path', cachedPath);
});
Expand Down
3 changes: 3 additions & 0 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ async function run() {
version = await getStableKubectlVersion();
}
let cachedPath = await downloadKubectl(version);

core.addPath(path.dirname(cachedPath));

console.log(`Kubectl tool version: '${version}' has been cached at ${cachedPath}`);
core.setOutput('kubectl-path', cachedPath);
}
Expand Down

0 comments on commit 861c756

Please sign in to comment.