mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00: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:
parent
3a4149a9e7
commit
008764a2cd
1 changed files with 2 additions and 2 deletions
|
@ -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(),
|
||||
]
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue