Skip to content

Commit 6a1746e

Browse files
tareknaservincenzopalazzo
authored andcommitted
fix(coffee): use disable-plugin instead
Signed-off-by: Tarek <[email protected]>
1 parent 36fc91d commit 6a1746e

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

coffee_cmd/src/coffee_term/command_show.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub fn show_list(coffee_list: Result<CoffeeList, CoffeeError>) -> Result<(), Cof
2121
term::format::dim(String::from("●")),
2222
term::format::bold(String::from("Language")),
2323
term::format::bold(String::from("Name")),
24-
term::format::bold(String::from("Enabled?")),
24+
term::format::bold(String::from("Enabled")),
2525
term::format::bold(String::from("Exec path")),
2626
]);
2727
table.divider();

coffee_core/src/coffee.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ impl PluginManager for CoffeeManager {
614614
return Err(error!("Plugin `{plugin}` is already disabled"));
615615
}
616616
self.coffee_cln_config
617-
.rm_conf("plugin", Some(&plugin.exec_path))
617+
.add_conf("disable-plugin", &plugin.exec_path)
618618
.map_err(|err| error!("{}", err.cause))?;
619619
log::debug!(
620620
"Plugin {} was removed from CLN configuration successfully",
@@ -646,7 +646,7 @@ impl PluginManager for CoffeeManager {
646646
));
647647
}
648648
self.coffee_cln_config
649-
.add_conf("plugin", &plugin.exec_path)
649+
.rm_conf("disable-plugin", Some(&plugin.exec_path))
650650
.map_err(|err| error!("{}", err.cause))?;
651651
log::debug!(
652652
"Plugin {} was added to CLN configuration successfully",

coffee_lib/src/plugin.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ pub struct Plugin {
104104
conf: Option<Conf>,
105105
/// FIXME: this field shouldn't be optional
106106
pub commit: Option<String>,
107-
/// Optional for now to be backward compatible
107+
// Optional for now to be backward compatible
108+
/// If the plugin is enabled or not
108109
pub enabled: Option<bool>,
109110
}
110111

0 commit comments

Comments
 (0)