feat: launch options for plugins
Some checks failed
/ cargo-fmtcheck (push) Has been cancelled
/ cargo-clippy (push) Has been cancelled
/ cargo-test (push) Has been cancelled
/ appimage (push) Has been cancelled

This commit is contained in:
Gabriele Musco 2025-01-12 10:05:51 +01:00
commit 18e5670d90
No known key found for this signature in database
GPG key ID: 1068D795C80E51DE
2 changed files with 12 additions and 4 deletions

View file

@ -256,10 +256,16 @@ impl App {
); );
None None
} else { } else {
Some(format!( Some(format!("'{}'", {
"'{}'", let mut cmd_parts = vec![cp
cp.plugin.executable().unwrap().to_string_lossy() .plugin
)) .executable()
.unwrap()
.to_string_lossy()
.to_string()];
cmd_parts.extend(cp.plugin.luanch_opts.clone().unwrap_or_default());
cmd_parts.join(" ")
}))
} }
} else { } else {
None None

View file

@ -27,6 +27,8 @@ pub struct Plugin {
pub exec_url: Option<String>, pub exec_url: Option<String>,
/// either one of exec_url or exec_path must be provided /// either one of exec_url or exec_path must be provided
pub exec_path: Option<PathBuf>, pub exec_path: Option<PathBuf>,
/// options and arguments that should be passed to the plugin executable
pub luanch_opts: Option<Vec<String>>,
} }
impl Plugin { impl Plugin {