change default to /usr/local + add /share/ to suffix

This commit is contained in:
Darren Schroeder 2024-06-19 15:57:01 -05:00
parent a52fe798a7
commit d04741603d

View File

@ -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
// otherwise default to /usr/share/nushell/vendor/autoload
option_env!("PREFIX").map(String::from).map_or_else(
|| Some("/usr/share/nushell/vendor/autoload".into()),
|prefix| Some(format!("{}/nushell/vendor/autoload", prefix)),
|| Some("/usr/local/nushell/vendor/autoload".into()),
|prefix| Some(format!("{}/share/nushell/vendor/autoload", prefix)),
)
}
})