diff --git a/Library/Homebrew/service.rb b/Library/Homebrew/service.rb index a205d56972..4845d10011 100644 --- a/Library/Homebrew/service.rb +++ b/Library/Homebrew/service.rb @@ -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"}"