File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env node
2
2
3
+ // Simply move to the next command available on the `$PATH`. This is needed
4
+ // during `npm` install process
5
+
6
+
3
7
const path = require ( 'path' )
4
8
const spawn = require ( 'child_process' ) . spawn
5
9
6
10
7
- var PATH = process . env . PATH . split ( ':' )
8
11
var command = process . argv [ 1 ]
9
12
var argv = process . argv . slice ( 2 )
10
13
14
+ // Remove us from the `$PATH` and try to find the system one again
15
+ var PATH = process . env . PATH . split ( ':' )
11
16
var index = PATH . indexOf ( path . dirname ( command ) )
12
17
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 ( ':' )
17
19
18
20
19
21
spawn ( path . basename ( command ) , argv , { stdio : 'inherit' } )
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " nodeos-cross-toolchain" ,
3
- "version" : " 1.0.0-RC2.10 " ,
3
+ "version" : " 1.0.0-RC2.11 " ,
4
4
"description" : " Cross-toolchain to build NodeOS based on Compressed Linux From Scratch Embedded" ,
5
5
"bin" : {
6
6
"addr2line" : " bin/addr2line" ,
You can’t perform that action at this time.
0 commit comments