Skip to content

Commit 039f6c1

Browse files
committed
lib/lua: workaround builtins.match alias issue
It seems that `with lib` isn't (always) bringing `match` into scope Odd, but we can fix by explicitly using `builtins.match`.
1 parent 7dcdd6e commit 039f6c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/to-lua.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ rec {
3030

3131
# Valid lua identifiers are not reserved keywords, do not start with a digit,
3232
# and contain only letters, digits, and underscores.
33-
isIdentifier = s: !(isKeyword s) && (match "[A-Za-z_][0-9A-Za-z_]*" s) == [ ];
33+
isIdentifier = s: !(isKeyword s) && (builtins.match "[A-Za-z_][0-9A-Za-z_]*" s) == [ ];
3434

3535
# toLua' with default options, aliased as toLuaObject at the top-level
3636
toLua = toLua' { };

0 commit comments

Comments
 (0)