Closed YonatanKra closed 2 years ago
@YonatanKra cloning your repo I noticed the error message "the input device is not a TTY" when using "commands"
instead of "command"
.
This is because "commands" defaults to parallel execution, so the stdio options cannot be inherited. If you add "parallel": false
to the options object, your e2e target should work with "commands"
Am I good to close this, or do you have some further question / request?
Thanks @AgentEnder . What if I need to run several commands in parallel (which is the main purpose for moving to the commands
syntax). What's the cause for the difference?
Check out the difference in implementation of the 2 functions referenced here: https://github.com/nrwl/nx/blob/master/packages/workspace/src/executors/run-commands/run-commands.impl.ts#L81
The gist is that processes ran in parallel cannot inherit stdin, and the docker run script you are invoking is throwing if it cannot process stdin.
Amazing! Thanks a lot!
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.
Current Behavior
When running the command like this:
It works fine.
Trying to run it like this:
Results in an error.
Expected Behavior
I'd expect the two commands to run the same way.
Steps to Reproduce
git clone https://github.com/Vonage/vivid-3.git
git checkout nx-run-commands-bug
npm i
npx nx run components:e2e
and see it failslibs/components/project.json
and changee2e: {options: { commands: []} }
to thecommand
syntax (e.g.e2e: { options: { command: "" } }
).npx nx run components:e2e
and see it succeeds in running the e2e testsFailure Logs
Environment