Skip to content

Commit e502096

Browse files
committed
[rust] get tests passing
handling the exe extension in windows can be complicated
1 parent 250a509 commit e502096

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

rust/tests/common.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ use std::path::Path;
2828

2929
#[allow(dead_code)]
3030
pub fn get_selenium_manager() -> Command {
31-
let path = env!("CARGO_BIN_EXE_selenium-manager");
31+
let mut path = env!("CARGO_BIN_EXE_selenium-manager").to_string();
32+
33+
if cfg!(windows) && !path.ends_with(".exe") {
34+
path.push_str(".exe");
35+
}
3236

3337
if Path::new(path).exists() {
3438
return Command::new(path);

0 commit comments

Comments
 (0)