Merge pull request #15875 from MikeMcQuaid/service_quote_args

service: correctly quote arguments.
This commit is contained in:
Mike McQuaid 2023-08-16 12:25:54 +01:00 committed by GitHub
commit 2038481909
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -398,7 +398,7 @@ module Homebrew
vars = @environment_variables.except(:PATH)
.map { |k, v| "#{k}=\"#{v}\"" }
out = vars + command if command?
out = vars + T.must(command).map { |arg| Utils::Shell.sh_quote(arg) } if command?
out.join(" ")
end