about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-07-04T13·38+0200
committerEelco Dolstra <edolstra@gmail.com>2017-07-04T13·38+0200
commitad8b96f1f2c80bf3f91ceab4d955aa368b7c85d4 (patch)
treeb74d62b10b650c13d61a5d8393a015a728b0ced8
parentc0015e87af70f539f24d2aa2bc224a9d8b84276b (diff)
Fix handling of expression installables with a / in them
-rw-r--r--src/nix/installables.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nix/installables.cc b/src/nix/installables.cc
index f23308b9bc30..9982ff75f4f4 100644
--- a/src/nix/installables.cc
+++ b/src/nix/installables.cc
@@ -189,7 +189,10 @@ std::vector<std::shared_ptr<Installable>> InstallablesCommand::parseInstallables
 
     for (auto & s : ss) {
 
-        if (s.find("/") != std::string::npos) {
+        if (s.compare(0, 1, "(") == 0)
+            result.push_back(std::make_shared<InstallableExpr>(*this, s));
+
+        else if (s.find("/") != std::string::npos) {
 
             auto path = store->toStorePath(store->followLinksToStore(s));
 
@@ -201,9 +204,6 @@ std::vector<std::shared_ptr<Installable>> InstallablesCommand::parseInstallables
             }
         }
 
-        else if (s.compare(0, 1, "(") == 0)
-            result.push_back(std::make_shared<InstallableExpr>(*this, s));
-
         else if (s == "" || std::regex_match(s, attrPathRegex))
             result.push_back(std::make_shared<InstallableAttrPath>(*this, s));