diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-05-02T13·28+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-05-02T13·46+0200 |
commit | cef8c169b1d100685d7c7b7bfb921eaa43b5521b (patch) | |
tree | 5d41d3c354cc98ed744e9b0ba939c8d112f42f6a /src/nix/command.hh | |
parent | 7dedd3fa2455f1e219bc671d04d1dd1eaec54dfa (diff) |
Fix "nix ... --all"
When "--all" is used, we should not fill in a default installable.
Diffstat (limited to 'src/nix/command.hh')
-rw-r--r-- | src/nix/command.hh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nix/command.hh b/src/nix/command.hh index dc7b2637d66a..cf0097d78926 100644 --- a/src/nix/command.hh +++ b/src/nix/command.hh @@ -78,7 +78,7 @@ struct InstallablesCommand : virtual Args, StoreCommand = import ...; bla = import ...; }’. */ Value * getSourceExpr(EvalState & state); - std::vector<std::shared_ptr<Installable>> parseInstallables(ref<Store> store, Strings installables); + std::vector<std::shared_ptr<Installable>> parseInstallables(ref<Store> store, Strings ss); PathSet buildInstallables(ref<Store> store, bool dryRun); @@ -86,6 +86,8 @@ struct InstallablesCommand : virtual Args, StoreCommand void prepare() override; + virtual bool useDefaultInstallables() { return true; } + private: Strings _installables; @@ -112,6 +114,8 @@ public: virtual void run(ref<Store> store, Paths storePaths) = 0; void run(ref<Store> store) override; + + bool useDefaultInstallables() override { return !all; } }; typedef std::map<std::string, ref<Command>> Commands; |