Skip to content

Commit 40556d7

Browse files
committed
[rust] Use multiple command in exec driver test
1 parent a50e738 commit 40556d7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rust/tests/common.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ pub fn get_driver_path(cmd: &mut Command) -> String {
6363
pub fn exec_driver(cmd: &mut Command) -> String {
6464
let cmd_mut = cmd.borrow_mut();
6565
let driver_path = get_driver_path(cmd_mut);
66-
let driver_version_command = shell::Command::new_single(format!("{} --version", &driver_path));
66+
let static_driver_path: &'static str = Box::leak(driver_path.into_boxed_str());
67+
let driver_version_command =
68+
shell::Command::new_multiple(vec![static_driver_path, "--version"]);
6769
let output = run_shell_command_by_os(OS, driver_version_command).unwrap();
6870
println!("**** EXEC DRIVER: {}", output);
6971
output

0 commit comments

Comments
 (0)