LnL7 / nix-darwin

nix modules for darwin
MIT License
3.19k stars 457 forks source link

launchd: only support setting `command` to a list #1088

Open Enzime opened 1 month ago

Enzime commented 1 month ago

@emilazy should I just deprecate setting command to a string with a warning?

emilazy commented 1 month ago

Deprecating that seems reasonable, but I’m a bit worried that it means the obvious translation of prog $a to [ "prog" "$a" ] behaves differently because of the escaping. I guess those cases can use script instead? Maybe we should use another name for this variant and just deprecate command entirely?

Enzime commented 1 month ago

I was thinking of changing the types to any options that set extra arguments to lists as well so that we can run them through lib.escapeShellArgs as well