Use new Ruby hash initializer syntax
This commit is contained in:
parent
f18a397289
commit
30b0399431
|
@ -57,12 +57,12 @@ module VagrantPlugins
|
|||
return 0 if command.empty?
|
||||
|
||||
opts = {
|
||||
:error_check => true,
|
||||
:error_class => Errors::ExecutionError,
|
||||
:error_key => :execution_error,
|
||||
:command => command,
|
||||
:shell => :powershell,
|
||||
:elevated => false
|
||||
error_check: true,
|
||||
error_class: Errors::ExecutionError,
|
||||
error_key: :execution_error,
|
||||
command: command,
|
||||
shell: :powershell,
|
||||
elevated: false
|
||||
}.merge(opts || {})
|
||||
|
||||
if opts[:elevated]
|
||||
|
@ -131,7 +131,7 @@ module VagrantPlugins
|
|||
# The error classes expect the translation key to be _key, but that makes for an ugly
|
||||
# configuration parameter, so we set it here from `error_key`
|
||||
msg = "Command execution failed with an exit code of #{output[:exitcode]}"
|
||||
error_opts = opts.merge(:_key => opts[:error_key], :message => msg)
|
||||
error_opts = opts.merge(_key: opts[:error_key], message: msg)
|
||||
raise opts[:error_class], error_opts
|
||||
end
|
||||
end #WinRM class
|
||||
|
|
Loading…
Reference in New Issue