diff --git a/fish-rust/src/env/environment.rs b/fish-rust/src/env/environment.rs index a5ea48225604..3e75cd0fa69f 100644 --- a/fish-rust/src/env/environment.rs +++ b/fish-rust/src/env/environment.rs @@ -512,7 +512,7 @@ fn setup_path() { str2wcstring(cstr.to_bytes()) } else { // the above should really not fail - L!("/usr/bin:/bin").to_owned() + join_strings(crate::path::DEFAULT_PATH.as_ref(), ':') }; vars.set_one(L!("PATH"), EnvMode::GLOBAL | EnvMode::EXPORT, path); diff --git a/fish-rust/src/path.rs b/fish-rust/src/path.rs index 668f92f4fa63..f0926f25eb8e 100644 --- a/fish-rust/src/path.rs +++ b/fish-rust/src/path.rs @@ -185,7 +185,7 @@ pub fn path_get_path(cmd: &wstr, vars: &dyn Environment) -> Option { // PREFIX is defined at build time. #[widestrs] -static DEFAULT_PATH: Lazy<[WString; 3]> = Lazy::new(|| { +pub static DEFAULT_PATH: Lazy<[WString; 3]> = Lazy::new(|| { [ "/bin"L.to_owned(), "/usr/bin"L.to_owned(),