From bba6fe1d5876b1bc23cf834e6c825047156461ec Mon Sep 17 00:00:00 2001 From: Paul Cacheux Date: Thu, 19 Aug 2021 21:19:21 +0200 Subject: [PATCH] Fix extractor selection on windows --- dist/index.js | 4 ++-- src/installer.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 8c745f3..3131cd1 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5084,9 +5084,9 @@ function installGoVersion(info, auth) { } function extractGoArchive(archivePath) { return __awaiter(this, void 0, void 0, function* () { - const arch = os_1.default.arch(); + const platform = os_1.default.platform(); let extPath; - if (arch === 'win32') { + if (platform === 'win32') { extPath = yield tc.extractZip(archivePath); } else { diff --git a/src/installer.ts b/src/installer.ts index 0e0d5d3..6a835fc 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -122,10 +122,10 @@ async function installGoVersion( } export async function extractGoArchive(archivePath: string): Promise { - const arch = os.arch(); + const platform = os.platform(); let extPath: string; - if (arch === 'win32') { + if (platform === 'win32') { extPath = await tc.extractZip(archivePath); } else { extPath = await tc.extractTar(archivePath);