change default to /usr/local + add /share/ to suffix
This commit is contained in:
parent
a52fe798a7
commit
d04741603d
|
@ -211,8 +211,8 @@ pub(crate) fn create_nu_constant(engine_state: &EngineState, span: Span) -> Valu
|
||||||
// check to see if PREFIX env var is set, and use it as PREFIX/nushell/vendor/autoload
|
// check to see if PREFIX env var is set, and use it as PREFIX/nushell/vendor/autoload
|
||||||
// otherwise default to /usr/share/nushell/vendor/autoload
|
// otherwise default to /usr/share/nushell/vendor/autoload
|
||||||
option_env!("PREFIX").map(String::from).map_or_else(
|
option_env!("PREFIX").map(String::from).map_or_else(
|
||||||
|| Some("/usr/share/nushell/vendor/autoload".into()),
|
|| Some("/usr/local/nushell/vendor/autoload".into()),
|
||||||
|prefix| Some(format!("{}/nushell/vendor/autoload", prefix)),
|
|prefix| Some(format!("{}/share/nushell/vendor/autoload", prefix)),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user