mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 08:50:19 +00:00
Add multiple --prepare support
Signed-off-by: Saurav Sharma <appdroiddeveloper@gmail.com>
This commit is contained in:
1 parent
2c3ced9333
commit
0c0713da30
5 files changed
+36
-12
No files matched your search
+5
-1
@@ -113,7 +113,11 @@ fn build_hyperfine_options(matches: &ArgMatches<'_>) -> Result<HyperfineOptions,
|
||||
(None, None) => {}
|
||||
};
|
||||
|
||||
options.preparation_command = matches.value_of("prepare").map(String::from);
|
||||
if let Some(values) = matches.values_of("prepare") {
|
||||
options.preparation_command = Some(values.map(String::from).collect::<Vec<String>>());
|
||||
} else {
|
||||
options.preparation_command = None;
|
||||
}
|
||||
|
||||
options.cleanup_command = matches.value_of("cleanup").map(String::from);
|
||||
|
||||
|
||||
Reference in new issue
Block a user