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

Affected fails when providing 2 parameters like nx affected --target=test --ci --code-coverage #12984

Closed
WolfSoko opened this issue Nov 4, 2022 · 2 comments
Assignees
Labels

Comments

@WolfSoko
Copy link

WolfSoko commented Nov 4, 2022

Current Behavior

E.g.: Affected Jest tests are not running when using parameters like:
npx nx affected --target=test --ci --code-coverage

Error message:

Somehow missleading:
Nx no longer supports using positional arguments for base and head. Please use --base and --head instead.

Expected Behavior

Command works, or error message is meaningfull.
I found a workaround with double -- but that is not documented: npx nx affected --target=test -- --ci --code-coverage

Is this a regression? Yes, it works with nrwl@14.7.13

Steps to Reproduce

create nx monorepo with 15.0.1 and jest tests.

run npx nx affected --target=test --ci --code-coverage in terminal.

Failure Logs

npx nx affected --target=test --ci --code-coverage
nx.js affected

Run target for affected projects

Run command using --base=[SHA1] (affected by the committed, uncommitted and untracked changes):
  --base  Base of the current branch (usually main)                                                                                                                                                                                                              [string]

or using --base=[SHA1] --head=[SHA2] (affected by the committed changes):
  --base  Base of the current branch (usually main)                                                                                                                                                                                                              [string]
  --head  Latest commit of the current branch (usually HEAD)                                                                                                                                                                                                     [string]

or using:
  affected --target=test --base=main~1 --head=main        Run tests for all the projects affected by the last commit on main

Find more information and examples at https://nx.dev/nx/affected

Nx no longer supports using positional arguments for base and head. Please use --base and --head instead.

Environment

Bug happend on
node 16 and node 18 in
powershell windows 11,
github pipeline ubuntu-latest
nrwl@workspace@15.0.1

@AgentEnder AgentEnder added the scope: core core nx functionality label Nov 4, 2022
@FrozenPandaz
Copy link
Collaborator

Fixed with #12994 :)

@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 Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants