Add correct path from data-dir (#14894)

Fix issue in #14879 with incorrect subdirectory.
Before: Appended `vendor/autoload`
After: Appends `nushell/vendor/autoload`
This commit is contained in:
Douglas 2025-01-22 11:19:46 -05:00 committed by GitHub
parent 73c08fcb2b
commit befeddad59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -321,7 +321,7 @@ pub fn get_vendor_autoload_dirs(_engine_state: &EngineState) -> Vec<PathBuf> {
}
if let Some(data_dir) = nu_path::data_dir() {
append_fn(PathBuf::from(data_dir).join("vendor").join("autoload"));
append_fn(into_autoload_path_fn(PathBuf::from(data_dir)));
}
if let Some(path) = std::env::var_os("NU_VENDOR_AUTOLOAD_DIR") {