mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-06-04 22:32:49 -04:00
Update validation to look for if provider_config is empty not nil
This commit is contained in:
parent
be939fcb59
commit
cf063c6e38
2 changed files with 5 additions and 2 deletions
|
|
@ -184,7 +184,7 @@ module VagrantPlugins
|
|||
end
|
||||
end
|
||||
|
||||
if @provider_config
|
||||
if !@provider_config.empty?
|
||||
if !@provider_config.keys.include?(machine.provider_name)
|
||||
machine.env.ui.warn(I18n.t("vagrant.config.disk.missing_provider",
|
||||
machine: machine.name,
|
||||
|
|
|
|||
|
|
@ -9,8 +9,11 @@ describe VagrantPlugins::Kernel_V2::VagrantConfigDisk do
|
|||
|
||||
subject { described_class.new(type) }
|
||||
|
||||
let(:ui) { double("ui") }
|
||||
let(:env) { double("env", ui: ui) }
|
||||
let(:provider) { double("provider") }
|
||||
let(:machine) { double("machine", provider: provider, provider_name: :virtualbox) }
|
||||
let(:machine) { double("machine", name: "name", provider: provider, env: env,
|
||||
provider_name: :virtualbox) }
|
||||
|
||||
|
||||
def assert_invalid
|
||||
|
|
|
|||
Loading…
Reference in a new issue