1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

lib.warn: Say _evaluation_ warning, like builtins.warn

This commit is contained in:
Lorenz Leutgeb 2024-06-06 01:09:13 +02:00 committed by Robert Hensing
parent f7250f372a
commit 4584ea0767

View file

@ -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 "warning: ${msg}" (abort "NIX_ABORT_ON_WARN=true; warnings are treated as unrecoverable errors.")
else builtins.trace "warning: ${msg}" v
then builtins.trace "evaluation warning: ${msg}" (abort "NIX_ABORT_ON_WARN=true; warnings are treated as unrecoverable errors.")
else builtins.trace "evaluation warning: ${msg}" v
);
/**