Bug 1467728 - Fix mozrunner build on macOS. r?whimboo
Bug 1464995 broke mozrunner on macOS, but we did not notice because
geckodriver is not compiled on macOS. This fixes the build.
MozReview-Commit-ID: GnvZTT30wHG
--- a/testing/mozbase/rust/mozrunner/src/runner.rs
+++ b/testing/mozbase/rust/mozrunner/src/runner.rs
@@ -371,22 +371,22 @@ pub mod platform {
for &(prefix_home, trial_path) in [
(
false,
"/Applications/Firefox.app/Contents/MacOS/firefox-bin",
),
(true, "Applications/Firefox.app/Contents/MacOS/firefox-bin"),
].iter()
{
- let path = match (home, prefix_home) {
+ let path = match (home.as_ref(), prefix_home) {
(Some(ref home_dir), true) => home_dir.join(trial_path),
(None, true) => continue,
- (_, false) => trial_path.to_path_buf(),
+ (_, false) => PathBuf::from(trial_path),
};
- if is_binary(path) {
+ if is_binary(&path) {
return Some(path);
}
}
None
}
pub fn arg_prefix_char(c: char) -> bool {