-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
--benchmark_color=auto (the default value) always prints color #559
Comments
PR in progress. |
iillyyaa
added a commit
to iillyyaa/benchmark
that referenced
this issue
Oct 5, 2018
As prevously written, "--benchmark_color=auto" was treated as true, because IsTruthyFlagValue("auto") returned true. The fix is to rely on IsColorTerminal test only if the flag value is "auto", and fall back to IsTruthyFlagValue otherwise. I also integrated force_no_color check into the same block.
iillyyaa
added a commit
to iillyyaa/benchmark
that referenced
this issue
Oct 5, 2018
As prevously written, "--benchmark_color=auto" was treated as true, because IsTruthyFlagValue("auto") returned true. The fix is to rely on IsColorTerminal test only if the flag value is "auto", and fall back to IsTruthyFlagValue otherwise. I also integrated force_no_color check into the same block.
dmah42
pushed a commit
that referenced
this issue
Oct 8, 2018
As prevously written, "--benchmark_color=auto" was treated as true, because IsTruthyFlagValue("auto") returned true. The fix is to rely on IsColorTerminal test only if the flag value is "auto", and fall back to IsTruthyFlagValue otherwise. I also integrated force_no_color check into the same block.
JBakamovic
pushed a commit
to JBakamovic/benchmark
that referenced
this issue
Dec 6, 2018
As prevously written, "--benchmark_color=auto" was treated as true, because IsTruthyFlagValue("auto") returned true. The fix is to rely on IsColorTerminal test only if the flag value is "auto", and fall back to IsTruthyFlagValue otherwise. I also integrated force_no_color check into the same block.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Benchmark defaults to "auto" for deciding to whether to use color or not, as part of the following conditional:
But
IsTruthyFlagValue
is permissive and returnstrue
for the string "auto", causingIsColorTerminal()
to be ignored.The text was updated successfully, but these errors were encountered: