1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 22:33:57 +02:00

Make nix log command easy to copy on its own line

This commit is contained in:
Robert Hensing 2024-11-08 20:17:13 +01:00
parent 59246349d5
commit 4b44fa0f06

View file

@ -991,8 +991,10 @@ Goal::Co DerivationGoal::buildDone()
auto nixLogCommand = experimentalFeatureSettings.isEnabled(Xp::NixCommand) auto nixLogCommand = experimentalFeatureSettings.isEnabled(Xp::NixCommand)
? "nix log" ? "nix log"
: "nix-store -l"; : "nix-store -l";
// Don't put quotes around the command. This is copy-pasted a ton, so don't make that error prone. // The command is on a separate line for easy copying, such as with triple click.
msg += fmt("For full logs, run " ANSI_BOLD "%s %s" ANSI_NORMAL, // This message will be indented elsewhere, so removing the indentation before the
// command will not put it at the start of the line unfortunately.
msg += fmt("For full logs, run:\n " ANSI_BOLD "%s %s" ANSI_NORMAL,
nixLogCommand, nixLogCommand,
worker.store.printStorePath(drvPath)); worker.store.printStorePath(drvPath));
} }