diff --git a/dist/index.js b/dist/index.js index 5b31635..9422460 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3424,12 +3424,8 @@ async function downloadAndExtract(platform, ruby) { console.log(url) const downloadPath = await tc.downloadTool(url) - if (platform.startsWith('windows')) { - let args = [ '-xz', '-C', rubiesDir, '-f', downloadPath ] - await exec.exec('C:\\Windows\\system32\\tar.exe', args) - } else { - await tc.extractTar(downloadPath, rubiesDir) - } + const tar = platform.startsWith('windows') ? 'C:\\Windows\\system32\\tar.exe' : 'tar' + await exec.exec(tar, [ '-xz', '-C', rubiesDir, '-f', downloadPath ]) return path.join(rubiesDir, ruby) } diff --git a/ruby-builder.js b/ruby-builder.js index 264b31e..0388710 100644 --- a/ruby-builder.js +++ b/ruby-builder.js @@ -36,12 +36,8 @@ async function downloadAndExtract(platform, ruby) { console.log(url) const downloadPath = await tc.downloadTool(url) - if (platform.startsWith('windows')) { - let args = [ '-xz', '-C', rubiesDir, '-f', downloadPath ] - await exec.exec('C:\\Windows\\system32\\tar.exe', args) - } else { - await tc.extractTar(downloadPath, rubiesDir) - } + const tar = platform.startsWith('windows') ? 'C:\\Windows\\system32\\tar.exe' : 'tar' + await exec.exec(tar, [ '-xz', '-C', rubiesDir, '-f', downloadPath ]) return path.join(rubiesDir, ruby) }