Update logic when stderr
is not the console
#3458
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When
stderr
is not the console, it's likely a log file or device.In which case, interactive progress updates become a nuisance : instead of updating the same visual line as an activity signal before being overwritten by final operation summary, all these updates are appended into logs, which is rather messy.
Therefore, it's preferable to disable progress updates in these situations.
This was achieved a long time ago, by reducing the
displayLevel
to 1 in these cases, which is equivalent to-q
.Problem is, this would not only disable progress updates, but also all warnings, and the final operation summary.
In short, it was silencing too much.
This happened because back then we had no other tool than
displayLevel
.But today, we can selectively disable progress updates, without impacting other messages.
Change the policy when
stderr
is not the console : only disable progress updates, but keep final operation summary (and warnings if they happen).Updated
tests/cli-tests/
accordingly.Also : changed default policy of
tests/cli-tests/
: when no.stderr.strict
norstderr.glob
are provided, default to ignorestderr
output.Previous policy was requiring
stderr
to be empty in this case. If it's important forstderr
to be empty to pass the test, provide an empty.stderr.strict
file.