about summary refs log tree commit diff
path: root/src/nix/log.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/log.cc')
-rw-r--r--src/nix/log.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nix/log.cc b/src/nix/log.cc
index ed610261d1ca..62ae6b8facf0 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);