Skip to content

Commit bf8b766

Browse files
committed
Cleanups
1 parent 44338c5 commit bf8b766

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function findUbuntuVersion() {
4747
export function win2nix(path) {
4848
if (/^[A-Z]:/i.test(path)) {
4949
// path starts with drive
50-
path = `/${path[0].toLowerCase()}${path.split(':')[1]}`
50+
path = `/${path[0].toLowerCase()}${path.split(':', 2)[1]}`
5151
}
5252
return path.replace(/\\/g, '/').replace(/ /g, '\\ ')
5353
}

dist/index.js

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ruby-builder.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ async function downloadAndExtract(platform, engine, version) {
3737
await common.measure('Extracting Ruby', async () => {
3838
if (process.env.ImageOS === 'win16') {
3939
const tar = '"C:\\Program Files\\Git\\usr\\bin\\tar.exe"'
40-
await exec.exec(tar, [ '-xz', '-C', common.win2nix(rubiesDir), '-f',
41-
common.win2nix(downloadPath) ])
40+
await exec.exec(tar, [ '-xz', '-C', common.win2nix(rubiesDir), '-f', common.win2nix(downloadPath) ])
4241
} else {
4342
const tar = platform.startsWith('windows') ? 'C:\\Windows\\system32\\tar.exe' : 'tar'
4443
await exec.exec(tar, [ '-xz', '-C', rubiesDir, '-f', downloadPath ])

0 commit comments

Comments
 (0)