From ea3932be22f45fe7e876cce3f0727bb5ed45439a Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Wed, 9 Feb 2022 09:25:51 -0800 Subject: [PATCH] Allow options hash for action on provider client --- plugins/commands/serve/client/provider.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/commands/serve/client/provider.rb b/plugins/commands/serve/client/provider.rb index 0c8c3e962..dd6fed59e 100644 --- a/plugins/commands/serve/client/provider.rb +++ b/plugins/commands/serve/client/provider.rb @@ -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