Skip to content

Commit

Permalink
fix(libnpmexec): workspaces support
Browse files Browse the repository at this point in the history
Fixes the proper path location to use when targetting specific
workspaces.

Makes it so that libnpmexec is always reading from the
Arborist actual tree instead of reading `node_modules` from
the file system when retrieving local package data.

Fixes: #3520
Relates to: #4619
Relates to: npm/statusboard#403
  • Loading branch information
ruyadorno committed Mar 31, 2022
1 parent ff1367f commit 0b405af
Show file tree
Hide file tree
Showing 6 changed files with 369 additions and 112 deletions.
2 changes: 1 addition & 1 deletion lib/commands/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class Exec extends BaseCommand {

for (const path of this.workspacePaths) {
const locationMsg = await getLocationMsg({ color, path })
await this.exec(args, { locationMsg, path, runPath: path })
await this.exec(args, { locationMsg, path: this.npm.localPrefix, runPath: path })
}
}
}
Expand Down
Loading

0 comments on commit 0b405af

Please sign in to comment.