diff --git a/lib/attrsets.nix b/lib/attrsets.nix index 4f7d795c397f..c639e8a18dc8 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.