fix: wrap single plugin cmd parts in single quotes

This commit is contained in:
Gabriele Musco 2025-01-26 11:03:31 +01:00
parent 2bec37ee24
commit 35d268e01b
No known key found for this signature in database
GPG key ID: 1068D795C80E51DE

View file

@ -256,7 +256,7 @@ impl App {
);
None
} else {
Some(format!("'{}'", {
Some({
let mut cmd_parts = vec![cp
.plugin
.executable()
@ -264,8 +264,12 @@ impl App {
.to_string_lossy()
.to_string()];
cmd_parts.extend(cp.plugin.args.clone().unwrap_or_default());
cmd_parts.join(" ")
}))
cmd_parts
.iter()
.map(|part| format!("'{part}'"))
.collect::<Vec<String>>()
.join(" ")
})
}
} else {
None