From 6e6e2691a8b8435ac7a8535cf0c4e0645ec20fa2 Mon Sep 17 00:00:00 2001 From: Cory Forsstrom Date: Wed, 1 Mar 2023 07:11:16 -0800 Subject: fix(plugins): location path decoding from Url (#2190) * Add unit test for plugin run location parsing * Fix file plugin parsing for relative paths * Update test to check for path with spaces * Add a couple more tests --- zellij-utils/src/input/plugins.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'zellij-utils/src/input/plugins.rs') diff --git a/zellij-utils/src/input/plugins.rs b/zellij-utils/src/input/plugins.rs index 1ab3e831f..47cc3aa74 100644 --- a/zellij-utils/src/input/plugins.rs +++ b/zellij-utils/src/input/plugins.rs @@ -225,8 +225,10 @@ impl Default for PluginType { pub enum PluginsConfigError { #[error("Duplication in plugin tag names is not allowed: '{}'", String::from(.0.clone()))] DuplicatePlugins(PluginTag), + #[error("Failed to parse url: {0:?}")] + InvalidUrl(#[from] url::ParseError), #[error("Only 'file:' and 'zellij:' url schemes are supported for plugin lookup. '{0}' does not match either.")] - InvalidUrl(Url), + InvalidUrlScheme(Url), #[error("Could not find plugin at the path: '{0:?}'")] InvalidPluginLocation(PathBuf), } -- cgit v1.2.3