mirror of
https://github.com/nushell/nushell.git
synced 2024-12-22 23:23:12 +01:00
Permit Nu finding and picking up development plugins if there are any first.
This commit is contained in:
parent
ea3b3e42c4
commit
d0d56deaf1
13
src/cli.rs
13
src/cli.rs
@ -113,7 +113,10 @@ fn search_paths() -> Vec<std::path::PathBuf> {
|
|||||||
let mut path = std::path::PathBuf::from(".");
|
let mut path = std::path::PathBuf::from(".");
|
||||||
path.push("target");
|
path.push("target");
|
||||||
path.push("debug");
|
path.push("debug");
|
||||||
search_paths.push(path);
|
|
||||||
|
if path.exists() {
|
||||||
|
search_paths.push(path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(debug_assertions))]
|
#[cfg(not(debug_assertions))]
|
||||||
@ -122,9 +125,15 @@ fn search_paths() -> Vec<std::path::PathBuf> {
|
|||||||
let mut path = std::path::PathBuf::from(".");
|
let mut path = std::path::PathBuf::from(".");
|
||||||
path.push("target");
|
path.push("target");
|
||||||
path.push("release");
|
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
|
search_paths
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user