diff options
| author | Robert Hensing <robert@roberthensing.nl> | 2024-07-16 15:55:05 +0200 |
|---|---|---|
| committer | Robert Hensing <robert@roberthensing.nl> | 2024-07-16 15:56:01 +0200 |
| commit | 7d4a9a5772966bf10f31c6dc51ff7cfa1c8ce02f (patch) | |
| tree | bec0efea17358e61af455337c7b970bdc2884810 | |
| parent | lib.warn: Fix color (diff) | |
| download | nixpkgs-7d4a9a5772966bf10f31c6dc51ff7cfa1c8ce02f.tar.gz | |
lib.warn: Remove color from the message itself
This aligns with Nix and makes it more readable.
The prefix still stands out.
| -rw-r--r-- | lib/trivial.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/trivial.nix b/lib/trivial.nix index 9db1bfa66682..4e9ec8cfbab4 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -710,8 +710,8 @@ in { # `builtins.warn` requires a string message, so we enforce that in our implementation, so that callers aren't accidentally incompatible with newer Nix versions. assert isString msg; if mustAbort - then builtins.trace "[1;31mevaluation warning: ${msg}[0m" (abort "NIX_ABORT_ON_WARN=true; warnings are treated as unrecoverable errors.") - else builtins.trace "[1;35mevaluation warning: ${msg}[0m" v + then builtins.trace "[1;31mevaluation warning:[0m ${msg}" (abort "NIX_ABORT_ON_WARN=true; warnings are treated as unrecoverable errors.") + else builtins.trace "[1;35mevaluation warning:[0m ${msg}" v ); /** |
