File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,13 @@ var path = require('path');
66var fs = require ( 'fs' ) ;
77
88if (
9- ! process . argv
10- || process . argv . length < 2
11- || ( process . argv [ 1 ] !== __filename && fs . statSync ( process . argv [ 1 ] ) . ino !== fs . statSync ( __filename ) . ino )
12- || ( process . env . _ && path . resolve ( process . env . _ ) !== __filename )
9+ String ( process . env . npm_lifecycle_script ) . slice ( 0 , 8 ) !== 'resolve '
10+ && (
11+ ! process . argv
12+ || process . argv . length < 2
13+ || ( process . argv [ 1 ] !== __filename && fs . statSync ( process . argv [ 1 ] ) . ino !== fs . statSync ( __filename ) . ino )
14+ || ( process . env . _ && path . resolve ( process . env . _ ) !== __filename )
15+ )
1316) {
1417 console . error ( 'Error: `resolve` must be run directly as an executable' ) ;
1518 process . exit ( 1 ) ;
You can’t perform that action at this time.
0 commit comments