lib/to-lua: fix allowUnkeyedAttrs option

This commit is contained in:
Matt Sturgeon 2024-09-29 16:25:07 +01:00
parent 2cda50d530
commit 4e2a022165
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -250,7 +250,7 @@ rec {
+ lib.concatStringsSep ("," + introSpace) (
lib.mapAttrsToList (
name: value:
(if allowExplicitEmpty && lib.hasPrefix "__unkeyed" name then "" else toTableKey name + " = ")
(if allowUnkeyedAttrs && lib.hasPrefix "__unkeyed" name then "" else toTableKey name + " = ")
+ lib.addErrorContext "while evaluating an attribute `${name}`" (go (indent + " ") value)
) v
)