apply should return null if the argument is not a list
Fixes https://github.com/nix-darwin/nix-darwin/issues/1578
This commit is contained in:
parent
8df64f8196
commit
349b2c66a9
1 changed files with 11 additions and 1 deletions
|
|
@ -121,7 +121,17 @@ in
|
|||
key. Please note: many people are confused by this key. Please read `execvp(3)` very carefully!
|
||||
'';
|
||||
# TODO: Remove this some time after 25.11.
|
||||
apply = map (value: lib.warnIf (lib.hasInfix "&" value) "A value for `ProgramArguments` contains the literal string `&`. This is no longer necessary and will lead to double-escaping, as nix-darwin now automatically escapes special characters." value);
|
||||
apply =
|
||||
val:
|
||||
if (builtins.isNull val) then
|
||||
val
|
||||
else
|
||||
(map (
|
||||
item:
|
||||
lib.warnIf (lib.hasInfix "&" item)
|
||||
"A value for `ProgramArguments` contains the literal string `&`. This is no longer necessary and will lead to double-escaping, as nix-darwin now automatically escapes special characters."
|
||||
item
|
||||
) val);
|
||||
};
|
||||
|
||||
EnableGlobbing = mkOption {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue