service: fix systemd command line quoting
Fixes #18802 (affected formulae still need rebuilding).
This commit is contained in:
parent
15146b2b67
commit
bba67ec02e
@ -465,7 +465,7 @@ module Homebrew
|
||||
EOS
|
||||
|
||||
# command needs to be first because it initializes all other values
|
||||
cmd = command&.map { |arg| Utils::Shell.sh_quote(arg) }
|
||||
cmd = command&.map { |arg| Utils::Service.systemd_quote(arg) }
|
||||
&.join(" ")
|
||||
|
||||
options = []
|
||||
|
||||
@ -727,7 +727,7 @@ RSpec.describe Homebrew::Service do
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=#{HOMEBREW_PREFIX}/opt/#{name}/bin/beanstalkd test
|
||||
ExecStart="#{HOMEBREW_PREFIX}/opt/#{name}/bin/beanstalkd" "test"
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
WorkingDirectory=#{HOMEBREW_PREFIX}/var
|
||||
@ -760,7 +760,7 @@ RSpec.describe Homebrew::Service do
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=#{HOMEBREW_PREFIX}/opt/#{name}/bin/beanstalkd
|
||||
ExecStart="#{HOMEBREW_PREFIX}/opt/#{name}/bin/beanstalkd"
|
||||
EOS
|
||||
expect(unit).to eq(unit_expect.strip)
|
||||
end
|
||||
@ -783,7 +783,7 @@ RSpec.describe Homebrew::Service do
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=#{HOMEBREW_PREFIX}/opt/#{name}/bin/beanstalkd
|
||||
ExecStart="#{HOMEBREW_PREFIX}/opt/#{name}/bin/beanstalkd"
|
||||
WorkingDirectory=#{Dir.home}
|
||||
EOS
|
||||
expect(unit).to eq(unit_expect.strip)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user