From d0d56deaf1f48f8d88cd97798b712a5eaac15e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20N=2E=20Robalino?= Date: Thu, 12 Sep 2019 18:49:29 -0500 Subject: [PATCH] Permit Nu finding and picking up development plugins if there are any first. --- src/cli.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index c3b3eaeb5..7b6f6e863 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -113,7 +113,10 @@ fn search_paths() -> Vec { 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 { 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 }