mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-06-11 09:40:07 -04:00
Allow options hash for action on provider client
This commit is contained in:
parent
8867dfc33c
commit
ea3932be22
1 changed files with 8 additions and 2 deletions
|
|
@ -62,8 +62,14 @@ module VagrantPlugins
|
|||
|
||||
# @param [Sdk::Args::Machine]
|
||||
# @param [Symbol] name of the action to run
|
||||
def action(machine, name)
|
||||
run_func(Type::Direct.new(value: [machine]), func_args: name)
|
||||
def action(machine, name, opts={})
|
||||
opts = {} if !opts.is_a?(Hash)
|
||||
opts.compact!
|
||||
run_func(
|
||||
Type::Direct.new(value: [machine]),
|
||||
Type::Options.new(value: opts),
|
||||
func_args: name,
|
||||
)
|
||||
end
|
||||
|
||||
# Generate callback and spec for required arguments
|
||||
|
|
|
|||
Loading…
Reference in a new issue