Skip to content

Commit 4f32df0

Browse files
committed
[fix] $PATH was wrongly set to an array instead of an string
1 parent 3388534 commit 4f32df0

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

bypass.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
#!/usr/bin/env node
22

3+
// Simply move to the next command available on the `$PATH`. This is needed
4+
// during `npm` install process
5+
6+
37
const path = require('path')
48
const spawn = require('child_process').spawn
59

610

7-
var PATH = process.env.PATH.split(':')
811
var command = process.argv[1]
912
var argv = process.argv.slice(2)
1013

14+
// Remove us from the `$PATH` and try to find the system one again
15+
var PATH = process.env.PATH.split(':')
1116
var index = PATH.indexOf(path.dirname(command))
1217
if(index >= 0)
13-
{
14-
PATH = PATH.slice(index+1)
15-
process.env.PATH = PATH
16-
}
18+
process.env.PATH = PATH.slice(index+1).join(':')
1719

1820

1921
spawn(path.basename(command), argv, {stdio: 'inherit'})

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nodeos-cross-toolchain",
3-
"version": "1.0.0-RC2.10",
3+
"version": "1.0.0-RC2.11",
44
"description": "Cross-toolchain to build NodeOS based on Compressed Linux From Scratch Embedded",
55
"bin": {
66
"addr2line": "bin/addr2line",

0 commit comments

Comments
 (0)