From 898b99d7c24723d06c2ed654d104adc8fbae8832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20N=2E=20Robalino?= Date: Mon, 23 Sep 2019 17:27:18 -0500 Subject: [PATCH] Ignore incompatible plugins and continue plugin search. --- src/cli.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index b94f824dba..31017ac6aa 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -92,7 +92,10 @@ fn load_plugin(path: &std::path::Path, context: &mut Context) -> Result<(), Shel } Err(e) => Err(e), }, - Err(e) => Err(ShellError::string(format!("Error: {:?}", e))), + Err(e) => { + trace!("incompatible plugin {:?}", input); + Err(ShellError::string(format!("Error: {:?}", e))) + } } } Err(e) => Err(ShellError::string(format!("Error: {:?}", e))), @@ -204,7 +207,9 @@ fn load_plugins(context: &mut Context) -> Result<(), ShellError> { if is_valid_name && is_executable { trace!("Trying {:?}", bin.display()); - load_plugin(&bin, context)?; + + // we are ok if this plugin load fails + let _ = load_plugin(&bin, context); } } }