From f76f895efe5b9f19aa9db909354c6c0f2195630b Mon Sep 17 00:00:00 2001 From: akbash Date: Sun, 19 Jul 2026 23:07:10 +0300 Subject: fix: preserve plugin command arguments (#1613) --- src/app/api/plugins/manifest.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/app/api/plugins/manifest.rs') diff --git a/src/app/api/plugins/manifest.rs b/src/app/api/plugins/manifest.rs index c2f17704..645748e0 100644 --- a/src/app/api/plugins/manifest.rs +++ b/src/app/api/plugins/manifest.rs @@ -163,7 +163,14 @@ pub(crate) fn load_plugin_manifest( .into_iter() .map(normalize_manifest_event) .collect::, _>>()?; - events.sort_by(|a, b| a.on.cmp(&b.on).then_with(|| a.command.cmp(&b.command))); + events.sort_by(|a, b| { + a.on.cmp(&b.on).then_with(|| { + a.command + .iter() + .map(|arg| arg.trim()) + .cmp(b.command.iter().map(|arg| arg.trim())) + }) + }); let mut panes = raw .panes .into_iter() @@ -534,10 +541,6 @@ fn platform_name(p: PluginPlatform) -> &'static str { } fn normalize_command(command: Vec) -> Result, (&'static str, String)> { - let command = command - .into_iter() - .map(|arg| arg.trim().to_string()) - .collect::>(); if command.is_empty() || command.iter().any(|arg| arg.is_empty()) { return Err(( "invalid_plugin_command", -- cgit v1.2.3