mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
Improve build failure error messages
They're now laid out in a more readable way, and they shows the output paths (if known).
This commit is contained in:
parent
cdbe788c1f
commit
5a84237209
4 changed files with 54 additions and 8 deletions
|
@ -585,10 +585,14 @@ std::variant<std::pair<BuildResult::Status, Error>, SingleDrvOutputs> Derivation
|
|||
|
||||
diskFull |= cleanupDecideWhetherDiskFull();
|
||||
|
||||
auto msg = fmt("builder for '%s' %s",
|
||||
auto msg = fmt(
|
||||
"Cannot build '%s'.\n"
|
||||
"Reason: " ANSI_RED "builder %s" ANSI_NORMAL ".",
|
||||
Magenta(store.printStorePath(drvPath)),
|
||||
statusToString(status));
|
||||
|
||||
msg += showKnownOutputs(store, drv);
|
||||
|
||||
miscMethods->appendLogTailErrorMsg(msg);
|
||||
|
||||
if (diskFull)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue