service: handle quoting in service file, too.

Follow-up to https://github.com/Homebrew/brew/pull/15875 based on
https://github.com/Homebrew/homebrew-core/pull/139680#discussion_r1295770047
This commit is contained in:
Mike McQuaid 2023-08-16 13:58:03 +01:00
parent 2038481909
commit 6cb8f3d7e0
No known key found for this signature in database
GPG Key ID: 3338A31AFDB1D829

View File

@ -484,7 +484,8 @@ module Homebrew
EOS
# command needs to be first because it initializes all other values
cmd = command&.join(" ")
cmd = command&.map { |arg| Utils::Shell.sh_quote(arg) }
&.join(" ")
options = []
options << "Type=#{(@launch_only_once == true) ? "oneshot" : "simple"}"