diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc index 4dc9158e6558070bbbe14ecc91dee54b798d299d..b913d408efc6439e6aafaa4fd0d1f3e6bd7a0272 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); }