Add node modules and new code for release (#39)
Co-authored-by: tbarnes94 <tbarnes94@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a10d84bc2e
commit
7ad2aa66bb
@ -52,10 +52,10 @@ function downloadKubectl(version) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let cachedToolpath = toolCache.find(kubectlToolName, version);
|
||||
let kubectlDownloadPath = '';
|
||||
const arch = helpers_1.getKubectlArch();
|
||||
const arch = (0, helpers_1.getKubectlArch)();
|
||||
if (!cachedToolpath) {
|
||||
try {
|
||||
kubectlDownloadPath = yield toolCache.downloadTool(helpers_1.getkubectlDownloadURL(version, arch));
|
||||
kubectlDownloadPath = yield toolCache.downloadTool((0, helpers_1.getkubectlDownloadURL)(version, arch));
|
||||
}
|
||||
catch (exception) {
|
||||
if (exception instanceof toolCache.HTTPError && exception.httpStatusCode === 404) {
|
||||
@ -65,9 +65,9 @@ function downloadKubectl(version) {
|
||||
throw new Error('DownloadKubectlFailed');
|
||||
}
|
||||
}
|
||||
cachedToolpath = yield toolCache.cacheFile(kubectlDownloadPath, kubectlToolName + helpers_1.getExecutableExtension(), kubectlToolName, version);
|
||||
cachedToolpath = yield toolCache.cacheFile(kubectlDownloadPath, kubectlToolName + (0, helpers_1.getExecutableExtension)(), kubectlToolName, version);
|
||||
}
|
||||
const kubectlPath = path.join(cachedToolpath, kubectlToolName + helpers_1.getExecutableExtension());
|
||||
const kubectlPath = path.join(cachedToolpath, kubectlToolName + (0, helpers_1.getExecutableExtension)());
|
||||
fs.chmodSync(kubectlPath, '777');
|
||||
return kubectlPath;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user