mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 14:34:21 +02:00
Simplify 'tar' in ruby_builder.js - downloadAndExtract
This commit is contained in:
+2
-6
@@ -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
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user