about summary refs log tree commit diff
path: root/src/nix/command.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-05-02T13·28+0200
committerEelco Dolstra <edolstra@gmail.com>2017-05-02T13·46+0200
commitcef8c169b1d100685d7c7b7bfb921eaa43b5521b (patch)
tree5d41d3c354cc98ed744e9b0ba939c8d112f42f6a /src/nix/command.hh
parent7dedd3fa2455f1e219bc671d04d1dd1eaec54dfa (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.hh6
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;