diff options
| author | akbash <akbash@herdr.dev> | 2026-07-19 23:07:10 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-19 23:07:10 +0300 |
| commit | f76f895efe5b9f19aa9db909354c6c0f2195630b (patch) | |
| tree | a10a8af928f400e096f18eccf1cd13f57e41dd16 /src/app/api/plugins/manifest.rs | |
| parent | 08409d167deba8950495d9737fb54b0cc6634f4c (diff) | |
fix: preserve plugin command arguments (#1613)
Diffstat (limited to 'src/app/api/plugins/manifest.rs')
| -rw-r--r-- | src/app/api/plugins/manifest.rs | 13 |
1 files changed, 8 insertions, 5 deletions
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::<Result<Vec<_>, _>>()?; - 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<String>) -> Result<Vec<String>, (&'static str, String)> { - let command = command - .into_iter() - .map(|arg| arg.trim().to_string()) - .collect::<Vec<_>>(); if command.is_empty() || command.iter().any(|arg| arg.is_empty()) { return Err(( "invalid_plugin_command", |
