Project

General

Profile

« Previous | Next » 

Revision 56b4310f

Added by Dominic Cleal over 8 years ago

fixes #11170 - pass quoted args through foreman-rake

Use the special "$@" to correctly pass quoted arguments through
foreman-rake, through su and to the underlying rake command. Ensures
the JSON in this command is unharmed:

foreman-rake config -- -k trusted_puppetmaster_hosts -v '["foo.bar.com"]'

Also swallows the "--" which gets passed through on some versions of
rake.

(cherry picked from commit e28614c06bf6ca27e5518e8fae667b9ade3f46b2)

View differences:

lib/tasks/config.rake
end
def run(args)
args.shift if args.first == '--'
parser.parse!(args)
if @key && @key_values.any?

Also available in: Unified diff