diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-07-14 13:56:18 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-07-14 13:56:18 +0200 |
commit | 832e111494d2d3acf3f919376d0f2765042946cc (patch) | |
tree | 5a14379a9aba8fe0edf19afde251d7ae8eab2a00 /src/nix/installables.cc | |
parent | 9223603908abaa62711296aa224e1bc3d7fb0a91 (diff) | |
parent | 926c3a6664a9dfb288ca35af8aae40c4e4a2badb (diff) |
Merge remote-tracking branch 'origin/master' into flakes
Diffstat (limited to 'src/nix/installables.cc')
-rw-r--r-- | src/nix/installables.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nix/installables.cc b/src/nix/installables.cc index adfd14a75..c97a0bdcf 100644 --- a/src/nix/installables.cc +++ b/src/nix/installables.cc @@ -289,8 +289,8 @@ struct InstallableStorePath : Installable ref<Store> store; StorePath storePath; - InstallableStorePath(ref<Store> store, const Path & storePath) - : store(store), storePath(store->parseStorePath(storePath)) { } + InstallableStorePath(ref<Store> store, StorePath && storePath) + : store(store), storePath(std::move(storePath)) { } std::string what() override { return store->printStorePath(storePath); } @@ -595,9 +595,9 @@ std::vector<std::shared_ptr<Installable>> SourceExprCommand::parseInstallables( if (s.find('/') != std::string::npos) { try { - result.push_back(std::make_shared<InstallableStorePath>(store, store->printStorePath(store->followLinksToStorePath(s)))); + result.push_back(std::make_shared<InstallableStorePath>(store, store->followLinksToStorePath(s))); continue; - } catch (NotInStore &) { + } catch (BadStorePath &) { } catch (...) { if (!ex) ex = std::current_exception(); |