mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 15:36:47 +03:00
Merge pull request #271767 from K900/fix-callpackage-errors
lib/customisation: fix callPackage error messages
This commit is contained in:
commit
8b0e496a27
@ -4,11 +4,12 @@ let
|
||||
inherit (builtins)
|
||||
intersectAttrs;
|
||||
inherit (lib)
|
||||
functionArgs isFunction mirrorFunctionArgs isAttrs setFunctionArgs levenshteinAtMost
|
||||
functionArgs isFunction mirrorFunctionArgs isAttrs setFunctionArgs
|
||||
optionalAttrs attrNames levenshtein filter elemAt concatStringsSep sort take length
|
||||
filterAttrs optionalString flip pathIsDirectory head pipe isDerivation listToAttrs
|
||||
mapAttrs seq flatten deepSeq warnIf isInOldestRelease extends
|
||||
;
|
||||
inherit (lib.strings) levenshteinAtMost;
|
||||
|
||||
in
|
||||
rec {
|
||||
@ -198,7 +199,7 @@ rec {
|
||||
+ "${loc'}${prettySuggestions (getSuggestions arg)}";
|
||||
|
||||
# Only show the error for the first missing argument
|
||||
error = errorForArg missingArgs.${head (attrNames missingArgs)};
|
||||
error = errorForArg (head (attrNames missingArgs));
|
||||
|
||||
in if missingArgs == {}
|
||||
then makeOverridable f allArgs
|
||||
|
Loading…
Reference in New Issue
Block a user