mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-29 10:31:14 -03:00
Make DEFAULT_PATH allow overriding system binaries
This is in regards to a comment on290d07a833, which resulted in46c967903d. Those commits handled the default path when it is unset on startup. DEFAULT_PATH is used when PATH is unset at runtime as far as I can tell. As far as I can tell this has had the non-overidding ordering behavior since inception (or at least 17 years agoea998b03f2).
This commit is contained in:
committed by
Fabian Boehm
parent
3a4149a9e7
commit
008764a2cd
@@ -187,10 +187,10 @@ pub fn path_get_path(cmd: &wstr, vars: &dyn Environment) -> Option<WString> {
|
||||
#[widestrs]
|
||||
static DEFAULT_PATH: Lazy<[WString; 3]> = Lazy::new(|| {
|
||||
[
|
||||
"/bin"L.to_owned(),
|
||||
"/usr/bin"L.to_owned(),
|
||||
// TODO This should use env!. The fallback is only to appease "cargo test" for now.
|
||||
WString::from_str(option_env!("PREFIX").unwrap_or("/usr/local")) + "/bin"L,
|
||||
"/usr/bin"L.to_owned(),
|
||||
"/bin"L.to_owned(),
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user