Skip to content

Commit

Permalink
fix(misc): add -W to yarn add to fix the error in yarn monorepos
Browse files Browse the repository at this point in the history
  • Loading branch information
vsavkin committed Dec 22, 2021
1 parent 411f467 commit 973cf4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/create-nx-workspace/bin/package-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export function getPackageManagerCommand(
case 'yarn':
return {
install: 'yarn',
add: 'yarn add',
addDev: 'yarn add -D',
add: 'yarn add -W',
addDev: 'yarn add -D -W',
rm: 'yarn remove',
exec: 'yarn',
run: (script: string, args: string) => `yarn ${script} ${args}`,
Expand Down
4 changes: 2 additions & 2 deletions packages/tao/src/shared/package-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export function getPackageManagerCommand(
const commands: { [pm in PackageManager]: () => PackageManagerCommands } = {
yarn: () => ({
install: 'yarn',
add: 'yarn add',
addDev: 'yarn add -D',
add: 'yarn add -W',
addDev: 'yarn add -D -W',
rm: 'yarn remove',
exec: 'yarn',
run: (script: string, args: string) => `yarn ${script} ${args}`,
Expand Down

0 comments on commit 973cf4e

Please sign in to comment.