File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ commander.usage("[command] [flags]");
3333commander . option ( "--json" , "" ) ;
3434commander . option ( "--modules-folder [path]" , "rather than installing modules into the node_modules " +
3535 "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" ) ;
3738// get command name
3839let commandName = args . splice ( 2 , 1 ) [ 0 ] || "" ;
3940
@@ -77,7 +78,8 @@ reporter.initPeakMemoryCounter();
7778
7879//
7980let config = new Config ( reporter , {
80- modulesFolder : commander . modulesFolder
81+ modulesFolder : commander . modulesFolder ,
82+ packagesRoot : commander . packagesRoot ,
8183} ) ;
8284
8385// print header
Original file line number Diff line number Diff line change @@ -90,7 +90,9 @@ export default class Config {
9090 this . cwd = opts . cwd ;
9191 }
9292
93- this . packagesRoot = await this . getPackageRoot ( opts ) ;
93+ if ( ! this . packagesRoot ) {
94+ this . packagesRoot = await this . getPackageRoot ( opts ) ;
95+ }
9496
9597 if ( ! this . tempFolder ) {
9698 this . tempFolder = await this . getTempFolder ( ) ;
You can’t perform that action at this time.
0 commit comments