CLI quiet mode - write database unlock errors to stderr
- Fixes #12402
Testing strategy
Updated test cases to account for password prompt being written to stderr in quiet mode
Type of change
- ✅ Bug fix (non-breaking change that fixes an issue)
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 64.20%. Comparing base (8d59090) to head (01a1982).
:warning: Report is 53 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #12403 +/- ##
===========================================
+ Coverage 64.19% 64.20% +0.01%
===========================================
Files 376 376
Lines 39371 39371
===========================================
+ Hits 25273 25275 +2
+ Misses 14098 14096 -2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
It is writing the unlock prompt to stderr right now by default 😅. When in quiet mode is just doesn't write the prompt at all, which doesn't make sense.
The point of quiet mode is that nothing but data is written to stdout
It is writing the unlock prompt to stderr right now by default 😅. When in quiet mode is just doesn't write the prompt at all, which doesn't make sense.
The point of quiet mode is that nothing but data is written to stdout
That was a bit unclear for me, because I thought only the errors should be written in quiet mode, not the password prompt. So if you are absolutely certain about this, go ahead.
I'd like to get @phoerious opinion, too.
IMHO, stdout should always be for anything that is payload data that you'd want to pipe somewhere or write to a file and stderr for anything that isn't, such as error and status messages. The prompt should be stderr as well. --quiet should suppress everything.
The prompt should be stderr as well. --quiet should suppress everything
Even errors?
Errors should be communicated via return codes. What we could also do is -q for no output and -qq for no error output.
That is a decent idea, I'll see what I can do here.