nx icon indicating copy to clipboard operation
nx copied to clipboard

fix(nx): ensure target-only argument is rewritten correctly to be forwarded

Open MarkMcCulloh opened this issue 2 years ago • 2 comments

Current Behavior

When running with target only and attempting to forward args to commands, you are forced to provide both target and project.

e.g.

nx build -- arg1 -t ./some/path

Results in Cannot find project 'arg1'. This worked as expected prior to https://github.com/nrwl/nx/pull/15193

Expected Behavior

When using -- to designate where you want to start passing args

nx build -- arg1 -t ./some/path

Will correctly translate to

nx run build arg1 -t ./some/path

Rather than

nx run arg1:build -t ./some/path

Related Issue(s)

Fixes #16499

MarkMcCulloh avatar Jul 05 '23 15:07 MarkMcCulloh

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 5, 2023 4:00pm

vercel[bot] avatar Jul 05 '23 15:07 vercel[bot]

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 1b101c94109c87f9adbde3a7ff9bd2fa90cb8cc7. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

nx-cloud[bot] avatar Jul 05 '23 15:07 nx-cloud[bot]

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

github-actions[bot] avatar Sep 27 '23 00:09 github-actions[bot]