query
On this page

warn

lib.warn

Docs pulled from | This Revision | 10 minutes ago


warn message value

Print a warning before returning the second argument.

See builtins.warn (Nix >= 2.23). On older versions, the Nix 2.23 behavior is emulated with builtins.trace, including the NIX_ABORT_ON_WARN behavior, but not the nix.conf setting or command line option.

Inputs

message (String)

Warning message to print before evaluating value.

value (any value)

Value to return as-is.

Type

String -> a -> a
(lib.trivial.warn)

Noogle detected

Aliases