mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 08:50:19 +00:00
Update error message
This commit is contained in:
1 parent
d1cd30b2a3
commit
33591d1433
1 file changed
+3
-4
+3
-4
@@ -33,12 +33,11 @@ fn run(commands: &[Command<'_>], options: &HyperfineOptions) -> io::Result<Vec<B
|
||||
|
||||
let mut timing_results = vec![];
|
||||
|
||||
// Check if preparation command is equal to command length or should be mentioned only once
|
||||
if let Some(preparation_command) = &options.preparation_command {
|
||||
if commands.len() != preparation_command.len() && preparation_command.len() > 1 {
|
||||
if preparation_command.len() > 1 && commands.len() != preparation_command.len() {
|
||||
error(
|
||||
"--prepare option should be provided only 1 time or N times equal to number of \
|
||||
commands to benchmark",
|
||||
"The '--prepare' option has to be provided just once or N times, where N is the \
|
||||
number of benchmark commands.",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user