Skip to content

Commit

Permalink
fix: respect include-workspace-root npmrc option
Browse files Browse the repository at this point in the history
fixes pnpm#4906
  • Loading branch information
shirotech committed Jun 24, 2022
1 parent 6576a92 commit 5088d1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/pnpm/src/main.ts
Expand Up @@ -197,7 +197,7 @@ export default async function run (inputArgv: string[]) {
const relativeWSDirPath = () => path.relative(process.cwd(), wsDir) || '.'
if (config.workspaceRoot) {
filters.push({ filter: `{${relativeWSDirPath()}}`, followProdDepsOnly: false })
} else if (cmd === 'run' || cmd === 'exec' || cmd === 'add' || cmd === 'test') {
} else if (!cliOptions['include-workspace-root'] && (cmd === 'run' || cmd === 'exec' || cmd === 'add' || cmd === 'test')) {
filters.push({ filter: `!{${relativeWSDirPath()}}`, followProdDepsOnly: false })
}

Expand Down

0 comments on commit 5088d1c

Please sign in to comment.