Skip to content

Commit 83758b5

Browse files
committed
Add packages-root as a cli option until we have better support for concurrent processes
1 parent d8059ad commit 83758b5

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/cli/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ commander.usage("[command] [flags]");
3333
commander.option("--json", "");
3434
commander.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
3839
let commandName = args.splice(2, 1)[0] || "";
3940

@@ -77,7 +78,8 @@ reporter.initPeakMemoryCounter();
7778

7879
//
7980
let config = new Config(reporter, {
80-
modulesFolder: commander.modulesFolder
81+
modulesFolder: commander.modulesFolder,
82+
packagesRoot: commander.packagesRoot,
8183
});
8284

8385
// print header

src/config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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();

0 commit comments

Comments
 (0)