mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 08:50:19 +00:00
Print stderr with --show-output flag
The `--print-stdout` flag has been changed to `--show-output` and now both stderr and stdout are forwarded when this option is specified.
This commit is contained in:
1 parent
e53726d3f7
commit
556788c160
5 files changed
+32
-31
No files matched your search
+3
-3
@@ -57,7 +57,7 @@ pub fn error(message: &str) -> ! {
|
||||
/// Runs the benchmark for the given commands
|
||||
fn run(commands: &Vec<Command>, options: &HyperfineOptions) -> io::Result<Vec<BenchmarkResult>> {
|
||||
let shell_spawning_time =
|
||||
mean_shell_spawning_time(&options.output_style, options.print_stdout)?;
|
||||
mean_shell_spawning_time(&options.output_style, options.show_output)?;
|
||||
|
||||
let mut timing_results = vec![];
|
||||
|
||||
@@ -129,13 +129,13 @@ fn build_hyperfine_options(matches: &ArgMatches) -> HyperfineOptions {
|
||||
|
||||
options.preparation_command = matches.value_of("prepare").map(String::from);
|
||||
|
||||
options.print_stdout = matches.is_present("print-stdout");
|
||||
options.show_output = matches.is_present("show-output");
|
||||
|
||||
options.output_style = match matches.value_of("style") {
|
||||
Some("full") => OutputStyleOption::Full,
|
||||
Some("basic") => OutputStyleOption::Basic,
|
||||
Some("nocolor") => OutputStyleOption::NoColor,
|
||||
_ => if !options.print_stdout && atty::is(Stream::Stdout) {
|
||||
_ => if !options.show_output && atty::is(Stream::Stdout) {
|
||||
OutputStyleOption::Full
|
||||
} else {
|
||||
OutputStyleOption::Basic
|
||||
|
||||
Reference in new issue
Block a user