From 6cb8f3d7e097cb55f6db183e2018762d54cd0577 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 16 Aug 2023 13:58:03 +0100 Subject: [PATCH] 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 --- Library/Homebrew/service.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"}"