Fix crashes on Vagrantfiles with provisioners

I forgot to handle nil in the new PluginOptions stuff, and options are
nil for Provisioner plugins.
This commit is contained in:
Paul Hinze 2022-07-20 17:23:19 -05:00
parent 7ccfff3ec2
commit 9ab94f9971
No known key found for this signature in database
GPG Key ID: 70B94C31D170FB29

View File

@ -37,6 +37,7 @@ module VagrantPlugins
# dependent so we need to unpack each kind of plugin options with its
# own logic.
def _plugin_options_to_hash(plg_opts)
return {} if plg_opts.nil?
opts = mapper.unany(plg_opts)
case opts
when Hashicorp::Vagrant::Sdk::PluginInfo::ProviderOptions