Merge pull request #660 from androbtech/plugin-search-paths

Permit Nu find and pick up development plugins if there are any first.
This commit is contained in:
Andrés N. Robalino 2019-09-12 19:08:28 -05:00 committed by GitHub
commit 970cc3c24d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,7 +113,10 @@ fn search_paths() -> Vec<std::path::PathBuf> {
let mut path = std::path::PathBuf::from(".");
path.push("target");
path.push("debug");
search_paths.push(path);
if path.exists() {
search_paths.push(path);
}
}
#[cfg(not(debug_assertions))]
@ -122,9 +125,15 @@ fn search_paths() -> Vec<std::path::PathBuf> {
let mut path = std::path::PathBuf::from(".");
path.push("target");
path.push("release");
search_paths.push(path);
if path.exists() {
search_paths.push(path);
}
}
// permit Nu finding and picking up development plugins
// if there are any first.
search_paths.reverse();
search_paths
}