about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/nix-env/main.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc
index 4dc9158e6558..b913d408efc6 100644
--- a/src/nix-env/main.cc
+++ b/src/nix-env/main.cc
@@ -750,7 +750,7 @@ static void opQuery(Globals & globals,
     /* Obtain derivation information from the specified source. */
     UserEnvElems availElems, installedElems;
 
-    if (source == sInstalled || compareVersions) {
+    if (source == sInstalled || compareVersions || printStatus) {
         installedElems = queryInstalled(globals.state, globals.profile);
     }