nx run --output-style=tty ( or just --tty ) to print only result of the command #29907
ThePlenkov
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
The context
i want to render few text files like this
cat openapi/types.md common.md abap.mdand send the result to another commandThe problem
in case if I want to wrap it to nx command i do something like
{ "name": "prompt", "targets": { "abap-openapi-types": { "executor": "nx:run-commands", "options": { "command": "cat openapi/types.md common.md abap.md", "cwd": "{projectRoot}", "tty": true } } } }however when I run my command like:
npx nx abap-openapi-types > test.logIn my test log I also have few lines which I don't want to have:
Proposed Solution
If we introduce a new output-style tty and use it like
nx run --output-style=tty commandor evennx run --tty commandthen NX will not print anything except the output of the command.Workarounds
cat ... > some_file.logand thennx run command && cat some_file.log | next commandDo you think is a good idea?
Do you know any other workaround solutions?
Thanks!
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions