summaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/input/plugins.rs
diff options
context:
space:
mode:
authorCory Forsstrom <cforsstrom18@gmail.com>2023-03-01 07:11:16 -0800
committerGitHub <noreply@github.com>2023-03-01 16:11:16 +0100
commit6e6e2691a8b8435ac7a8535cf0c4e0645ec20fa2 (patch)
tree56bf1dec9ea1eb4dfd89b07ee70b2e2f5435522b /zellij-utils/src/input/plugins.rs
parent6bec2c0b30cff3bade926f379a167d51cdd4a5cc (diff)
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
Diffstat (limited to 'zellij-utils/src/input/plugins.rs')
-rw-r--r--zellij-utils/src/input/plugins.rs4
1 files changed, 3 insertions, 1 deletions
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),
}