aboutsummaryrefslogtreecommitdiff
path: root/src/nix/flake.cc
diff options
context:
space:
mode:
authorMax <max@privatevoid.net>2023-01-27 23:59:48 +0100
committerMax <max@privatevoid.net>2023-01-27 23:59:48 +0100
commit02e81cdf6276dbaaa5ecb720fb3244d5cf2c5e8e (patch)
tree3f2dcb02d5613b7cc56f2e8b6fe5175dee1dfcbe /src/nix/flake.cc
parent79c084cb598221f5910c429127e8da33cff6a206 (diff)
apply showAllSystems to legacyPackages as well
Diffstat (limited to 'src/nix/flake.cc')
-rw-r--r--src/nix/flake.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nix/flake.cc b/src/nix/flake.cc
index 2e4d2cf3a..d2f68c37c 100644
--- a/src/nix/flake.cc
+++ b/src/nix/flake.cc
@@ -1121,6 +1121,12 @@ struct CmdFlakeShow : FlakeCommand, MixJSON
else {
logger->warn(fmt("%s omitted (use '--legacy' to show)", concatStringsSep(".", attrPathS)));
}
+ } else if (!showAllSystems && std::string(attrPathS[1]) != localSystem) {
+ if (!json)
+ logger->cout(fmt("%s " ANSI_WARNING "omitted" ANSI_NORMAL " (use '--all-systems' to show)", headerPrefix));
+ else {
+ logger->warn(fmt("%s omitted (use '--all-systems' to show)", concatStringsSep(".", attrPathS)));
+ }
} else {
if (visitor.isDerivation())
showDerivation();