Merge pull request #141 from paulcacheux/fix-windows-extractor-selection
Fix extractor selection on windows
This commit is contained in:
commit
331ce1d993
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -5084,9 +5084,9 @@ function installGoVersion(info, auth) {
|
|||||||
}
|
}
|
||||||
function extractGoArchive(archivePath) {
|
function extractGoArchive(archivePath) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const arch = os_1.default.arch();
|
const platform = os_1.default.platform();
|
||||||
let extPath;
|
let extPath;
|
||||||
if (arch === 'win32') {
|
if (platform === 'win32') {
|
||||||
extPath = yield tc.extractZip(archivePath);
|
extPath = yield tc.extractZip(archivePath);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -122,10 +122,10 @@ async function installGoVersion(
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function extractGoArchive(archivePath: string): Promise<string> {
|
export async function extractGoArchive(archivePath: string): Promise<string> {
|
||||||
const arch = os.arch();
|
const platform = os.platform();
|
||||||
let extPath: string;
|
let extPath: string;
|
||||||
|
|
||||||
if (arch === 'win32') {
|
if (platform === 'win32') {
|
||||||
extPath = await tc.extractZip(archivePath);
|
extPath = await tc.extractZip(archivePath);
|
||||||
} else {
|
} else {
|
||||||
extPath = await tc.extractTar(archivePath);
|
extPath = await tc.extractTar(archivePath);
|
||||||
|
Loading…
Reference in New Issue
Block a user