lib/options: allow rawLua in mkEnum' default

This commit is contained in:
Matt Sturgeon 2024-07-08 17:48:00 +01:00
parent aad2e32b5a
commit 0e8b248a52
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -216,7 +216,8 @@ rec {
v == null
|| elem v values
|| (v ? _type && v ? text)
|| abort "Default value ${showInline v} is not valid for enum ${showInline values}.";
|| (v ? __raw && isString v.__raw)
|| throw "Default value ${showInline v} is not valid for enum ${showInline values}.";
in
# Ensure `values` is a list and `pluginDefault` is valid if present
assert isList values;