This commit is contained in:
Bryan MacFarlane 2020-02-09 00:29:21 -05:00
parent 4282769cc0
commit dc575ee3b3
7 changed files with 108 additions and 91 deletions

View file

@ -30,8 +30,9 @@ function downloadGo(versionSpec, stable) {
let downloadUrl = `https://storage.googleapis.com/golang/${match.files[0]}`;
let downloadPath = yield tc.downloadTool(downloadUrl);
// extract
let extPath = sys.getPlatform() == 'windows' ?
yield tc.extractZip(downloadPath) : yield tc.extractTar(downloadPath);
let extPath = sys.getPlatform() == 'windows'
? yield tc.extractZip(downloadPath)
: yield tc.extractTar(downloadPath);
// extracts with a root folder that matches the fileName downloaded
const toolRoot = path.join(extPath, 'go');
toolPath = yield tc.cacheDir(toolRoot, 'go', versionSpec);
@ -77,7 +78,6 @@ function findMatch(versionSpec, stable) {
}
}
}
;
if (match && goFile) {
match.files = [goFile];
}