diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-07-14 17:10:13 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-07-14 18:29:10 +0200 |
commit | fdc9da034fd7e0cb9c5275209d991ed6ca38f1cc (patch) | |
tree | 43b8592e523540b47c9b80e1bb0c83178c408437 /src/nix/log.cc | |
parent | 3908d3929ceb07cee5983fa647817f0e7aecbd97 (diff) |
Avoid a call to derivationFromPath()
This doesn't work in read-only mode, ensuring that operations like
nix path-info --store https://cache.nixos.org -S nixpkgs.hello
(asking for the closure size of nixpkgs.hello in cache.nixos.org) work
when nixpkgs.hello doesn't exist in the local store.
Diffstat (limited to 'src/nix/log.cc')
-rw-r--r-- | src/nix/log.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nix/log.cc b/src/nix/log.cc index ed610261d..62ae6b8fa 100644 --- a/src/nix/log.cc +++ b/src/nix/log.cc @@ -28,7 +28,8 @@ struct CmdLog : InstallablesCommand subs.push_front(store); for (auto & inst : installables) { - for (auto & path : inst->toBuildable()) { + for (auto & b : inst->toBuildable()) { + auto path = b.second.drvPath != "" ? b.second.drvPath : b.first; bool found = false; for (auto & sub : subs) { auto log = sub->getBuildLog(path); |