Include machine name when raising invalid box errors
This commit is contained in:
parent
eba552ea73
commit
c238dc0a35
|
@ -19,7 +19,7 @@ module VagrantPlugins
|
|||
|
||||
if !vm_dir.directory? || !hd_dir.directory?
|
||||
@logger.error("Required virtual machine directory not found!")
|
||||
raise Errors::BoxInvalid
|
||||
raise Errors::BoxInvalid, name: env[:machine].name
|
||||
end
|
||||
|
||||
valid_config_ext = [".xml"]
|
||||
|
@ -37,7 +37,7 @@ module VagrantPlugins
|
|||
|
||||
if !config_path
|
||||
@logger.error("Failed to locate box configuration path")
|
||||
raise Errors::BoxInvalid
|
||||
raise Errors::BoxInvalid, name: env[:machine].name
|
||||
else
|
||||
@logger.info("Found box configuration path: #{config_path}")
|
||||
end
|
||||
|
@ -52,7 +52,7 @@ module VagrantPlugins
|
|||
|
||||
if !image_path
|
||||
@logger.error("Failed to locate box image path")
|
||||
raise Errors::BoxInvalid
|
||||
raise Errors::BoxInvalid, name: env[:machine].name
|
||||
else
|
||||
@logger.info("Found box image path: #{image_path}")
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ describe VagrantPlugins::HyperV::Action::Import do
|
|||
let(:ui){ double("ui") }
|
||||
let(:provider){ double("provider", driver: driver) }
|
||||
let(:driver){ double("driver") }
|
||||
let(:machine){ double("machine", provider: provider, provider_config: provider_config, box: box, data_dir: data_dir) }
|
||||
let(:machine){ double("machine", provider: provider, provider_config: provider_config, box: box, data_dir: data_dir, name: "machname") }
|
||||
let(:provider_config){
|
||||
double("provider_config",
|
||||
linked_clone: false,
|
||||
|
|
Loading…
Reference in New Issue