Skip to content

Commit

Permalink
🐛 args and options can be omitted as expected (fixes #34)
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixr-codes committed Oct 17, 2024
1 parent 1d0714d commit decd519
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ pub struct Plugin {

/// Arguments passed to the executable.
#[serde(default, flatten)]
pub args: PluginArgs,
pub args: Option<PluginArgs>,

/// A filter which decides whether the plugin should be run.
///
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl From<&config::Plugin> for ExecutablePlugin {
if value.with.is_some() {
args.push(value.run.clone());
};
match &value.args {
match value.args.clone().unwrap_or_default() {
config::PluginArgs::Options(options) => {
args.push(
serde_json::to_string(&options)
Expand Down

0 comments on commit decd519

Please sign in to comment.