core:runCommands: explicit `--parallel` argument doesn't override env variable `NX_PARALLEL`
Hotell opened this issue · comments
Current Behavior
inline CLI arguments won't override global env variables.
NX_PARALLEL=8 yarn nx run-many -t e2e --parallel=1
will result in running e2e
target in parallel process ( which in case of cypress will fail )
there is a bug within implementation:
nx/packages/nx/src/utils/command-line-utils.ts
Lines 180 to 196 in 2c4c2ae
Expected Behavior
CLI arguments should override ENV NX_
variables.
NOTE: haven't checked all source but I think it would be good to have this behaviour consistent for all ENV variables vs inline provided arguments
GitHub Repo
- microsoft/fluentui#31949
- commit as a workaround microsoft/fluentui@7e077d9
Steps to Reproduce
- clone the PR branch
NX_PARALLEL=8 yarn nx run-many -t e2e --parallel=1
Nx Report
Node : 20.15.0
OS : darwin-arm64
yarn : 1.23.34
nx : 19.3.2
@nx/js : 19.3.2
@nx/jest : 19.3.2
@nx/linter : 19.3.2
@nx/eslint : 19.3.2
@nx/workspace : 19.3.2
@nx/devkit : 19.3.2
@nx/eslint-plugin : 19.3.2
@nx/node : 19.3.2
@nx/plugin : 19.3.2
@nrwl/tao : 19.3.2
typescript : 5.0.4
---------------------------------------
Local workspace plugins:
@fluentui/workspace-plugin
Failure Logs
No response
Package Manager Version
yarn v1
Operating System
- macOS
- Linux
- Windows
- Other (Please specify)
Additional Information
No response
Hey Martin 👋
Looking in to this now, I think what you are saying makes sense. Shouldn't be a terribly hard changeset.
Thanks.