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
|
EOS
|
||||||
|
|
||||||
# command needs to be first because it initializes all other values
|
# 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(" ")
|
&.join(" ")
|
||||||
|
|
||||||
options = []
|
options = []
|
||||||
|
|||||||
@ -727,7 +727,7 @@ RSpec.describe Homebrew::Service do
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=#{HOMEBREW_PREFIX}/opt/#{name}/bin/beanstalkd test
|
ExecStart="#{HOMEBREW_PREFIX}/opt/#{name}/bin/beanstalkd" "test"
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=30
|
RestartSec=30
|
||||||
WorkingDirectory=#{HOMEBREW_PREFIX}/var
|
WorkingDirectory=#{HOMEBREW_PREFIX}/var
|
||||||
@ -760,7 +760,7 @@ RSpec.describe Homebrew::Service do
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=#{HOMEBREW_PREFIX}/opt/#{name}/bin/beanstalkd
|
ExecStart="#{HOMEBREW_PREFIX}/opt/#{name}/bin/beanstalkd"
|
||||||
EOS
|
EOS
|
||||||
expect(unit).to eq(unit_expect.strip)
|
expect(unit).to eq(unit_expect.strip)
|
||||||
end
|
end
|
||||||
@ -783,7 +783,7 @@ RSpec.describe Homebrew::Service do
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=#{HOMEBREW_PREFIX}/opt/#{name}/bin/beanstalkd
|
ExecStart="#{HOMEBREW_PREFIX}/opt/#{name}/bin/beanstalkd"
|
||||||
WorkingDirectory=#{Dir.home}
|
WorkingDirectory=#{Dir.home}
|
||||||
EOS
|
EOS
|
||||||
expect(unit).to eq(unit_expect.strip)
|
expect(unit).to eq(unit_expect.strip)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user