mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 08:50:19 +00:00
Parse --shell option value as shell command
This commit is contained in:
1 parent
5c6879e4c1
commit
e2fdaceb9f
7 files changed
+96
-20
No files matched your search
+4
-5
@@ -33,7 +33,7 @@ use benchmark_result::BenchmarkResult;
|
||||
use command::Command;
|
||||
use error::OptionsError;
|
||||
use export::{ExportManager, ExportType};
|
||||
use options::{CmdFailureAction, HyperfineOptions, OutputStyleOption};
|
||||
use options::{CmdFailureAction, HyperfineOptions, OutputStyleOption, Shell};
|
||||
use parameter_range::get_parameterized_commands;
|
||||
use tokenize::tokenize;
|
||||
use types::ParameterValue;
|
||||
@@ -229,10 +229,9 @@ fn build_hyperfine_options<'a>(
|
||||
OutputStyleOption::Disabled => {}
|
||||
};
|
||||
|
||||
options.shell = matches
|
||||
.value_of("shell")
|
||||
.unwrap_or(&options.shell)
|
||||
.to_string();
|
||||
if let Some(shell) = matches.value_of("shell") {
|
||||
options.shell = Shell::parse(shell)?;
|
||||
}
|
||||
|
||||
if matches.is_present("ignore-failure") {
|
||||
options.failure_action = CmdFailureAction::Ignore;
|
||||
|
||||
Reference in new issue
Block a user