change download for win32

This commit is contained in:
redanthrax 2022-06-28 13:37:53 -07:00
parent f4bcf8a3e1
commit 0111cab163
2 changed files with 15 additions and 2 deletions

View file

@ -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);