Merge pull request #292941 from adisbladis/lib-getattrfrompath-env

lib.getAttrFromPath: Don't use errorMessage variable
This commit is contained in:
Silvan Mosberger 2024-03-06 19:41:34 +01:00 committed by GitHub
commit 012faf046f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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.