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

Output retool apps errors to stderr #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

masaru-iritani
Copy link
Contributor

What

Use console.error instead of console.log to output errors of retool apps.

Why

I'm thinking of adding --json option to retool apps for outputting results in JSON. For that, it's important to differentiate standard outputs from errors. As the initial step, this change replaces all console.log outputting errors with console.error to redirect error messages to stderr, not stdout.

In addition, console.error renders messages in red, so errors stand out more.

How tested

An error message is rendered in red when stdout is redirected to /dev/null.

$ yes | ./lib/index.js apps --delete non_existing_app > /dev/null
0 or >1 Apps named non_existing_app found. 😓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant