author | Alex Gaynor <agaynor@mozilla.com> |
Fri, 12 Oct 2018 17:26:21 +0000 | |
changeset 441055 | 1122d74466326f6389e3728d9bf883af73303770 |
parent 441054 | 67a1e43538ab4632df396a80a4058f7d68d0cb79 |
child 441056 | 4e01769b6baf126a8f70713291e03592a090a379 |
push id | 108898 |
push user | aciure@mozilla.com |
push date | Sat, 13 Oct 2018 09:41:13 +0000 |
treeherder | mozilla-inbound@27ce80745049 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | jgraham |
bugs | 1498247 |
milestone | 64.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
testing/mozbase/rust/mozrunner/src/lib.rs | file | annotate | diff | comparison | revisions | |
testing/mozbase/rust/mozrunner/src/runner.rs | file | annotate | diff | comparison | revisions |
--- a/testing/mozbase/rust/mozrunner/src/lib.rs +++ b/testing/mozbase/rust/mozrunner/src/lib.rs @@ -1,11 +1,13 @@ #[macro_use] extern crate log; extern crate mozprofile; #[cfg(target_os = "windows")] extern crate winreg; +#[cfg(target_os = "macos")] +extern crate dirs; pub mod firefox_args; pub mod path; pub mod runner; pub use runner::platform::firefox_default_path;
--- a/testing/mozbase/rust/mozrunner/src/runner.rs +++ b/testing/mozbase/rust/mozrunner/src/runner.rs @@ -306,28 +306,28 @@ pub mod platform { pub fn arg_prefix_char(c: char) -> bool { c == '-' } } #[cfg(target_os = "macos")] pub mod platform { use path::{find_binary, is_binary}; - use std::env; use std::path::PathBuf; + use dirs; /// Searches the system path for `firefox-bin`, then looks for /// `Applications/Firefox.app/Contents/MacOS/firefox-bin` under both `/` /// (system root) and the user home directory. pub fn firefox_default_path() -> Option<PathBuf> { if let Some(path) = find_binary("firefox-bin") { return Some(path); } - let home = env::home_dir(); + let home = dirs::home_dir(); for &(prefix_home, trial_path) in [ ( false, "/Applications/Firefox.app/Contents/MacOS/firefox-bin", ), (true, "Applications/Firefox.app/Contents/MacOS/firefox-bin"), ].iter() {