diff options
author | adisbladis <adisbladis@gmail.com> | 2024-03-03 16:28:49 +1300 |
---|---|---|
committer | adisbladis <adisbladis@gmail.com> | 2024-03-03 16:30:00 +1300 |
commit | 948e5b841dc979ecf9c82dd432a7bb2280949265 (patch) | |
tree | 80fe05177bac7ea419ddcb7b9915dc46ae82c874 /lib/attrsets.nix | |
parent | 31f91738fb4aae351f1ee93300139c751dcf8196 (diff) |
lib.getAttrFromPath: Don't use errorMessage variable
We can just pass the error message on without creating an environment.
Diffstat (limited to 'lib/attrsets.nix')
-rw-r--r-- | lib/attrsets.nix | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/attrsets.nix b/lib/attrsets.nix index 4f7d795c397f2..c639e8a18dc88 100644 --- a/lib/attrsets.nix +++ b/lib/attrsets.nix @@ -216,8 +216,7 @@ rec { attrPath: # The nested attribute set to find the value in. set: - let errorMsg = "cannot find attribute `" + concatStringsSep "." attrPath + "'"; - in attrByPath attrPath (abort errorMsg) set; + attrByPath attrPath (abort ("cannot find attribute `" + concatStringsSep "." attrPath + "'")) set; /* Map each attribute in the given set and merge them into a new attribute set. |