Fix SSHKit #command override args mangling
This commit is contained in:
@@ -22,9 +22,11 @@ class SSHKit::Backend::Abstract
|
|||||||
|
|
||||||
# Override to merge options returned by commands in the args list with
|
# Override to merge options returned by commands in the args list with
|
||||||
# options passed by the CLI and pass them along as kwargs.
|
# options passed by the CLI and pass them along as kwargs.
|
||||||
def command(*args_and_options)
|
def command(args, options)
|
||||||
options, args = args_and_options.partition { |a| a.is_a? Hash }
|
more_options, args = args.partition { |a| a.is_a? Hash }
|
||||||
build_command(*args, **options.reduce(:deep_merge))
|
more_options << options
|
||||||
|
|
||||||
|
build_command(args, **more_options.reduce(:deep_merge))
|
||||||
end
|
end
|
||||||
|
|
||||||
# Destructure options to pluck out env for merge
|
# Destructure options to pluck out env for merge
|
||||||
|
|||||||
Reference in New Issue
Block a user