mirror of
https://github.com/actions/setup-go.git
synced 2025-04-24 18:02:15 +00:00
change download for win32
This commit is contained in:
parent
f4bcf8a3e1
commit
0111cab163
2 changed files with 15 additions and 2 deletions
9
dist/setup/index.js
vendored
9
dist/setup/index.js
vendored
|
@ -62214,7 +62214,14 @@ function resolveVersionFromManifest(versionSpec, stable, auth) {
|
|||
function installGoVersion(info, auth) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
core.info(`Acquiring ${info.resolvedVersion} from ${info.downloadUrl}`);
|
||||
const downloadPath = yield tc.downloadTool(info.downloadUrl, undefined, auth);
|
||||
let downloadPath;
|
||||
const platform = os_1.default.platform();
|
||||
if (platform === 'win32') {
|
||||
downloadPath = yield tc.downloadTool(info.downloadUrl, info.fileName, auth);
|
||||
}
|
||||
else {
|
||||
downloadPath = yield tc.downloadTool(info.downloadUrl, undefined, auth);
|
||||
}
|
||||
core.info('Extracting Go...');
|
||||
let extPath = yield extractGoArchive(downloadPath);
|
||||
core.info(`Successfully extracted go to ${extPath}`);
|
||||
|
|
|
@ -132,7 +132,13 @@ async function installGoVersion(
|
|||
auth: string | undefined
|
||||
): Promise<string> {
|
||||
core.info(`Acquiring ${info.resolvedVersion} from ${info.downloadUrl}`);
|
||||
const downloadPath = await tc.downloadTool(info.downloadUrl, undefined, auth);
|
||||
let downloadPath: string;
|
||||
const platform = os.platform();
|
||||
if(platform === 'win32') {
|
||||
downloadPath = await tc.downloadTool(info.downloadUrl, info.fileName, auth);
|
||||
} else {
|
||||
downloadPath = await tc.downloadTool(info.downloadUrl, undefined, auth);
|
||||
}
|
||||
|
||||
core.info('Extracting Go...');
|
||||
let extPath = await extractGoArchive(downloadPath);
|
||||
|
|
Loading…
Add table
Reference in a new issue