File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "clear" : true
3
+ }
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ var path = require('path');
3
3
4
4
function read ( dir ) {
5
5
var f = path . resolve ( dir , '.node-dev.json' ) ;
6
- return fs . existsSync ( f ) ? JSON . parse ( fs . readFileSync ( f , 'utf-8' ) ) : { } ;
6
+ return fs . existsSync ( f ) ? JSON . parse ( fs . readFileSync ( f , 'utf-8' ) ) : null ;
7
7
}
8
8
9
9
function resolvePath ( unresolvedPath ) {
@@ -13,10 +13,9 @@ function resolvePath(unresolvedPath) {
13
13
module . exports = function ( main , opts ) {
14
14
15
15
var dir = main ? path . dirname ( main ) : '.' ;
16
- var c = read ( dir ) ;
17
-
18
- /* eslint-disable no-proto */
19
- c . __proto__ = read ( process . env . HOME || process . env . USERPROFILE ) ;
16
+ var c = read ( dir )
17
+ || read ( process . cwd ( ) )
18
+ || read ( process . env . HOME || process . env . USERPROFILE ) || { } ;
20
19
21
20
// Truthy == --all-deps, false: one level of deps
22
21
if ( typeof c . deps !== 'number' ) c . deps = c . deps ? - 1 : 1 ;
You can’t perform that action at this time.
0 commit comments