File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ commander.usage("[command] [flags]");
33
33
commander . option ( "--json" , "" ) ;
34
34
commander . option ( "--modules-folder [path]" , "rather than installing modules into the node_modules " +
35
35
"folder relative to the cwd, output them here" ) ;
36
-
36
+ commander . option ( "--packages-root [path]" , "rather than storing modules into a global packages root," +
37
+ "store them here" ) ;
37
38
// get command name
38
39
let commandName = args . splice ( 2 , 1 ) [ 0 ] || "" ;
39
40
@@ -77,7 +78,8 @@ reporter.initPeakMemoryCounter();
77
78
78
79
//
79
80
let config = new Config ( reporter , {
80
- modulesFolder : commander . modulesFolder
81
+ modulesFolder : commander . modulesFolder ,
82
+ packagesRoot : commander . packagesRoot ,
81
83
} ) ;
82
84
83
85
// print header
Original file line number Diff line number Diff line change @@ -90,7 +90,9 @@ export default class Config {
90
90
this . cwd = opts . cwd ;
91
91
}
92
92
93
- this . packagesRoot = await this . getPackageRoot ( opts ) ;
93
+ if ( ! this . packagesRoot ) {
94
+ this . packagesRoot = await this . getPackageRoot ( opts ) ;
95
+ }
94
96
95
97
if ( ! this . tempFolder ) {
96
98
this . tempFolder = await this . getTempFolder ( ) ;
You can’t perform that action at this time.
0 commit comments