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?
|
if !vm_dir.directory? || !hd_dir.directory?
|
||||||
@logger.error("Required virtual machine directory not found!")
|
@logger.error("Required virtual machine directory not found!")
|
||||||
raise Errors::BoxInvalid
|
raise Errors::BoxInvalid, name: env[:machine].name
|
||||||
end
|
end
|
||||||
|
|
||||||
valid_config_ext = [".xml"]
|
valid_config_ext = [".xml"]
|
||||||
|
@ -37,7 +37,7 @@ module VagrantPlugins
|
||||||
|
|
||||||
if !config_path
|
if !config_path
|
||||||
@logger.error("Failed to locate box configuration path")
|
@logger.error("Failed to locate box configuration path")
|
||||||
raise Errors::BoxInvalid
|
raise Errors::BoxInvalid, name: env[:machine].name
|
||||||
else
|
else
|
||||||
@logger.info("Found box configuration path: #{config_path}")
|
@logger.info("Found box configuration path: #{config_path}")
|
||||||
end
|
end
|
||||||
|
@ -52,7 +52,7 @@ module VagrantPlugins
|
||||||
|
|
||||||
if !image_path
|
if !image_path
|
||||||
@logger.error("Failed to locate box image path")
|
@logger.error("Failed to locate box image path")
|
||||||
raise Errors::BoxInvalid
|
raise Errors::BoxInvalid, name: env[:machine].name
|
||||||
else
|
else
|
||||||
@logger.info("Found box image path: #{image_path}")
|
@logger.info("Found box image path: #{image_path}")
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,7 +8,7 @@ describe VagrantPlugins::HyperV::Action::Import do
|
||||||
let(:ui){ double("ui") }
|
let(:ui){ double("ui") }
|
||||||
let(:provider){ double("provider", driver: driver) }
|
let(:provider){ double("provider", driver: driver) }
|
||||||
let(:driver){ double("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){
|
let(:provider_config){
|
||||||
double("provider_config",
|
double("provider_config",
|
||||||
linked_clone: false,
|
linked_clone: false,
|
||||||
|
|
Loading…
Reference in New Issue