aboutsummaryrefslogtreecommitdiff
path: root/src/nix/main.cc
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2021-01-28 10:04:47 -0500
committerShea Levy <shea@shealevy.com>2021-02-24 08:25:45 -0500
commitf6c5b05488c588964f51ce97ad2c297fbca7ce96 (patch)
tree0d6d62aaa13ace160111c1c9580a9a7ccc6ba818 /src/nix/main.cc
parent98d1b64400cc7b75216fc885859883c707c18bef (diff)
Respect command registrations in plugins.
Diffstat (limited to 'src/nix/main.cc')
-rw-r--r--src/nix/main.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nix/main.cc b/src/nix/main.cc
index b078366fa..06e221682 100644
--- a/src/nix/main.cc
+++ b/src/nix/main.cc
@@ -159,6 +159,12 @@ struct NixArgs : virtual MultiCommand, virtual MixCommonArgs
#include "nix.md"
;
}
+
+ // Plugins may add new subcommands.
+ void pluginsInited() override
+ {
+ commands = RegisterCommand::getCommandsFor({});
+ }
};
static void showHelp(std::vector<std::string> subcommand)