Skip to content

Commit

Permalink
fix(nx): remove unused double dashes to avoid yarn's warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Teamop authored and vsavkin committed Sep 17, 2019
1 parent 28327d3 commit 37ab942
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/workspace/src/command-line/affected.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,20 @@ async function runCommand(
}

try {
const isYarn = path
.basename(process.env.npm_execpath || 'npm')
.startsWith('yarn');
await runAll(
projects.map(proj => {
return commonCommands.includes(targetName)
? `${cli} -- ${targetName} ${proj} ${transformArgs(
? `${cli} ${isYarn ? '' : '--'} ${targetName} ${proj} ${transformArgs(
args,
proj,
projectMetadata.get(proj)
).join(' ')} `
: `${cli} -- run ${proj}:${targetName} ${transformArgs(
: `${cli} ${
isYarn ? '' : '--'
} run ${proj}:${targetName} ${transformArgs(
args,
proj,
projectMetadata.get(proj)
Expand Down

0 comments on commit 37ab942

Please sign in to comment.