Skip to content

Commit

Permalink
fix(coffee): use disable-plugin instead
Browse files Browse the repository at this point in the history
Signed-off-by: Tarek <tareknaser360@gmail.com>
  • Loading branch information
tareknaser authored and vincenzopalazzo committed Feb 13, 2024
1 parent 36fc91d commit 6a1746e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion coffee_cmd/src/coffee_term/command_show.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub fn show_list(coffee_list: Result<CoffeeList, CoffeeError>) -> Result<(), Cof
term::format::dim(String::from("●")),
term::format::bold(String::from("Language")),
term::format::bold(String::from("Name")),
term::format::bold(String::from("Enabled?")),
term::format::bold(String::from("Enabled")),
term::format::bold(String::from("Exec path")),
]);
table.divider();
Expand Down
4 changes: 2 additions & 2 deletions coffee_core/src/coffee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ impl PluginManager for CoffeeManager {
return Err(error!("Plugin `{plugin}` is already disabled"));
}
self.coffee_cln_config
.rm_conf("plugin", Some(&plugin.exec_path))
.add_conf("disable-plugin", &plugin.exec_path)
.map_err(|err| error!("{}", err.cause))?;
log::debug!(
"Plugin {} was removed from CLN configuration successfully",
Expand Down Expand Up @@ -646,7 +646,7 @@ impl PluginManager for CoffeeManager {
));
}
self.coffee_cln_config
.add_conf("plugin", &plugin.exec_path)
.rm_conf("disable-plugin", Some(&plugin.exec_path))
.map_err(|err| error!("{}", err.cause))?;
log::debug!(
"Plugin {} was added to CLN configuration successfully",
Expand Down
3 changes: 2 additions & 1 deletion coffee_lib/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ pub struct Plugin {
conf: Option<Conf>,
/// FIXME: this field shouldn't be optional
pub commit: Option<String>,
/// Optional for now to be backward compatible
// Optional for now to be backward compatible
/// If the plugin is enabled or not
pub enabled: Option<bool>,
}

Expand Down

0 comments on commit 6a1746e

Please sign in to comment.