mirror of
https://github.com/actions/setup-go.git
synced 2025-07-01 05:33:43 +00:00
format
This commit is contained in:
parent
4282769cc0
commit
dc575ee3b3
7 changed files with 108 additions and 91 deletions
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue