Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract archive fix #242

Closed
wants to merge 16 commits into from
32 changes: 32 additions & 0 deletions .licenses/npm/@actions/http-client-2.0.1.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .licenses/npm/@actions/tool-cache.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

398 changes: 199 additions & 199 deletions dist/cache-save/index.js

Large diffs are not rendered by default.

1,951 changes: 1,319 additions & 632 deletions dist/setup/index.js

Large diffs are not rendered by default.

36 changes: 27 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -29,7 +29,7 @@
"@actions/glob": "^0.2.0",
"@actions/http-client": "^1.0.6",
"@actions/io": "^1.0.2",
"@actions/tool-cache": "^1.5.5",
"@actions/tool-cache": "^2.0.1",
"semver": "^6.1.1"
},
"devDependencies": {
Expand Down
8 changes: 7 additions & 1 deletion src/installer.ts
Expand Up @@ -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);
Expand Down