apply should return null if the argument is not a list (#1581)

This commit is contained in:
Sam 2025-09-04 19:58:58 +00:00 committed by GitHub
commit eaacfa1101
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {