mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 15:44:21 +01:00
lightningd: make --clear-plugins override prior plugin configvars.
It's an obscure command, but this we won't see old plugin commands in listconfigs (once it uses configvars). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -557,6 +557,13 @@ static char *opt_add_plugin_dir(const char *arg, struct lightningd *ld)
|
||||
static char *opt_clear_plugins(struct lightningd *ld)
|
||||
{
|
||||
clear_plugins(ld->plugins);
|
||||
|
||||
/* Remove from configvars too! */
|
||||
for (size_t i = 0; i < tal_count(ld->configvars); i++) {
|
||||
if (streq(ld->configvars[i]->optvar, "plugin")
|
||||
|| streq(ld->configvars[i]->optvar, "plugin-dir"))
|
||||
ld->configvars[i]->overridden = true;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user