lib.customisation: fix error message when running in nix repl (#452573)
This commit is contained in:
@@ -305,9 +305,10 @@ rec {
|
||||
arg:
|
||||
let
|
||||
loc = unsafeGetAttrPos arg fargs;
|
||||
loc' = if loc != null then loc.file + ":" + toString loc.line else "<unknown location>";
|
||||
in
|
||||
"Function called without required argument \"${arg}\" at "
|
||||
+ "${loc.file}:${toString loc.line}${prettySuggestions (getSuggestions arg)}";
|
||||
+ "${loc'}${prettySuggestions (getSuggestions arg)}";
|
||||
|
||||
# Only show the error for the first missing argument
|
||||
error = errorForArg (head (attrNames missingArgs));
|
||||
|
||||
Reference in New Issue
Block a user