mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
nixos/systemd-lib: fix assertValueOneOf
when value is not a string
This commit is contained in:
parent
05659962cd
commit
4392ec653c
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ in rec {
|
|||
|
||||
assertValueOneOf = name: values: group: attr:
|
||||
optional (attr ? ${name} && !elem attr.${name} values)
|
||||
"Systemd ${group} field `${name}' cannot have value `${attr.${name}}'.";
|
||||
"Systemd ${group} field `${name}' cannot have value `${toString attr.${name}}'.";
|
||||
|
||||
assertHasField = name: group: attr:
|
||||
optional (!(attr ? ${name}))
|
||||
|
|
Loading…
Reference in a new issue