diff options
Diffstat (limited to 'src/nix-env/main.cc')
-rw-r--r-- | src/nix-env/main.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc index ce0bef069708..a9f34387079b 100644 --- a/src/nix-env/main.cc +++ b/src/nix-env/main.cc @@ -832,18 +832,18 @@ static void opQuery(Globals & globals, XMLAttrs attrs; if (printStatus) { - Substitutes subs = store->querySubstitutes(i->queryOutPath(globals.state)); + bool hasSubs = store->hasSubstitutes(i->queryOutPath(globals.state)); bool isInstalled = installed.find(i->queryOutPath(globals.state)) != installed.end(); bool isValid = store->isValidPath(i->queryOutPath(globals.state)); if (xmlOutput) { attrs["installed"] = isInstalled ? "1" : "0"; attrs["valid"] = isValid ? "1" : "0"; - attrs["substitutable"] = !subs.empty() ? "1" : "0"; + attrs["substitutable"] = hasSubs ? "1" : "0"; } else columns.push_back( (string) (isInstalled ? "I" : "-") + (isValid ? "P" : "-") - + (!subs.empty() ? "S" : "-")); + + (hasSubs ? "S" : "-")); } if (xmlOutput) |