Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run-many does not recognize targets with a colon #16203

Closed
dlqqq opened this issue Apr 10, 2023 · 2 comments · Fixed by #16211
Closed

run-many does not recognize targets with a colon #16203

dlqqq opened this issue Apr 10, 2023 · 2 comments · Fixed by #16211
Assignees
Labels

Comments

@dlqqq
Copy link

dlqqq commented Apr 10, 2023

Current Behavior

run-many does not recognize targets with a colon in the name, even when wrapped with escaped quotes like so:

% yarn nx run-many --target=\"build:prod\"

Expected Behavior

run-many should recognize targets wrapped in double quotes.

GitHub Repo

https://github.com/dlqqq/nx-colon-issue

Steps to Reproduce

  1. Run nx run --target=build and run nx run --target=\"build:prod\".
  2. Verify you see the following output:
% yarn nx run-many --target=build
yarn run v1.22.19
$ /workplace/dlq/nx-colon-issue/node_modules/.bin/nx run-many --target=build

    ✔  nx run test:build  [local cache]

 ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 >  NX   Successfully ran target build for project test (61ms)

   Nx read the output from the cache instead of running the command for 1 out of 1 tasks.

Done in 0.34s.
(jai)
(23-04-10 17:54:53) <0> [/workplace/dlq/nx-colon-issue]
dev-dsk-dlq-2b-55651109 % yarn nx run-many --target=\"build:prod\"
yarn run v1.22.19
$ /workplace/dlq/nx-colon-issue/node_modules/.bin/nx run-many '--target="build:prod"'
 >  NX   Successfully ran target "build:prod" for 0 projects (5ms)

Done in 0.28s.

Nx Report

>  NX   Report complete - copy this into the issue template

   Node : 18.13.0
   OS   : linux x64
   yarn : 1.22.19

   nx            : 15.9.2
   lerna         : 6.6.1
   @nrwl/cli     : 15.9.2
   @nrwl/devkit  : 15.9.2
   @nrwl/tao     : 15.9.2
   typescript    : 4.1.6

Failure Logs

No response

Additional Information

No response

@AgentEnder
Copy link
Member

You can run this via nx run-many --target build:prod - the surrounding quotes aren't necessary with run-many, affected, or infix notation (e.g. nx build:prod project)

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants