Skip to content

Commit deeedb1

Browse files
authored
[rust] Canonicalize browser path found in PATH (#12413)
1 parent b9abe95 commit deeedb1

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

rust/src/lib.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,15 @@ pub trait SeleniumManager {
188188
}
189189

190190
if full_browser_path.exists() {
191+
let canon_browser_path = full_browser_path.as_path().canonicalize().unwrap();
191192
self.get_logger().debug(format!(
192193
"{} detected at {}",
193194
self.get_browser_name(),
194-
full_browser_path.display()
195+
canon_browser_path.display()
195196
));
196-
self.set_browser_path(path_buf_to_string(full_browser_path.clone()));
197-
198-
Some(full_browser_path)
197+
self.set_browser_path(path_buf_to_string(canon_browser_path.clone()));
198+
199+
Some(canon_browser_path)
199200
} else {
200201
// Check browser in PATH
201202
let browser_name = self.get_browser_name();

0 commit comments

Comments
 (0)