fix: alignment during flake show of legacyPackages
Fixes: https://github.com/NixOS/nix/issues/6240 https://github.com/NixOS/nix/issues/6045
This commit is contained in:
parent
bf89cd95a4
commit
8150b93968
1 changed files with 7 additions and 3 deletions
|
@ -1076,9 +1076,13 @@ struct CmdFlakeShow : FlakeCommand, MixJSON
|
||||||
else if (attrPath.size() > 0 && attrPathS[0] == "legacyPackages") {
|
else if (attrPath.size() > 0 && attrPathS[0] == "legacyPackages") {
|
||||||
if (attrPath.size() == 1)
|
if (attrPath.size() == 1)
|
||||||
recurse();
|
recurse();
|
||||||
else if (!showLegacy)
|
else if (!showLegacy){
|
||||||
logger->warn(fmt("%s: " ANSI_WARNING "omitted" ANSI_NORMAL " (use '--legacy' to show)", headerPrefix));
|
if (!json)
|
||||||
else {
|
logger->cout(fmt("%s " ANSI_WARNING "omitted" ANSI_NORMAL " (use '--legacy' to show)", headerPrefix));
|
||||||
|
else {
|
||||||
|
logger->warn(fmt("%s omitted (use '--legacy' to show)", concatStringsSep(".", attrPathS)));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (visitor.isDerivation())
|
if (visitor.isDerivation())
|
||||||
showDerivation();
|
showDerivation();
|
||||||
else if (attrPath.size() <= 2)
|
else if (attrPath.size() <= 2)
|
||||||
|
|
Loading…
Reference in a new issue