Simplify 'tar' in ruby_builder.js - downloadAndExtract

This commit is contained in:
MSP-Greg
2020-02-29 11:35:47 +01:00
committed by Benoit Daloze
parent 01b616c294
commit 970f6659fb
2 changed files with 4 additions and 12 deletions
Generated Vendored
+2 -6
View File
@@ -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)
}
+2 -6
View File
@@ -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)
}