Wrap service command parameters in single quotes

Should resolve issues with multi-word arguments, eg:

> Or, if you don't want/need a background service you can just run:
  /opt/homebrew/opt/nginx/bin/nginx -g daemon off;

fails, but 

> Or, if you don't want/need a background service you can just run:
  '/opt/homebrew/opt/nginx/bin/nginx' '-g' 'daemon off;'

succeeds
This commit is contained in:
Benjamin Bolton 2021-09-01 11:40:54 -06:00 committed by GitHub
parent 7c37a34cca
commit 4acb9cf734
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,7 +37,7 @@ class Caveats
if f.plist_manual || f.service?
command = if f.service?
f.service.command.join(" ")
f.service.command.map{ |arg| "'#{arg}'" }.join(" ")
else
f.plist_manual
end