about summary refs log tree commit diff
path: root/src/nix-store/nix-store.cc
diff options
context:
space:
mode:
authorGuillaume Maudoux <guillaume.maudoux@uclouvain.be>2019-03-01T00·15+0100
committerGuillaume Maudoux <layus.on@gmail.com>2019-03-09T23·56+0100
commit8574b703424b73f6f75fc549b1738a6534d6a01e (patch)
tree617296d76aae9b497935807b1ca7a4423a1cbf7e /src/nix-store/nix-store.cc
parentebc86550f92ec76cda0961ecc625944ec402d2cd (diff)
fixup! Make roots a map of store paths to pinning links
Diffstat (limited to 'src/nix-store/nix-store.cc')
-rw-r--r--src/nix-store/nix-store.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index b281ea2dd328..89831eb3d303 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -428,10 +428,10 @@ static void opQuery(Strings opFlags, Strings opArgs)
                     referrers, true, settings.gcKeepOutputs, settings.gcKeepDerivations);
             }
             Roots roots = store->findRoots();
-            for (auto & [path, roots] : roots)
+            for (auto & [path, links] : roots)
                 if (referrers.find(path) != referrers.end())
-                    for (auto & root : roots)
-                        cout << format("%1% -> %2%\n") % root % path;
+                    for (auto & link : links)
+                        cout << format("%1%\n") % link;
             break;
         }