Skip to content

Commit

Permalink
Fix handling of expression installables with a / in them
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Jul 4, 2017
1 parent c0015e8 commit ad8b96f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/nix/installables.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand All @@ -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));

Expand Down

0 comments on commit ad8b96f

Please sign in to comment.