Validate that disk file exists in disk config validate
This commit is contained in:
parent
cd98a8bf64
commit
3a2b4ddef2
|
@ -135,8 +135,8 @@ module VagrantPlugins
|
||||||
if @file
|
if @file
|
||||||
if !@file.is_a?(String)
|
if !@file.is_a?(String)
|
||||||
errors << "Config option `file` for #{machine.name} disk config is not a string"
|
errors << "Config option `file` for #{machine.name} disk config is not a string"
|
||||||
else
|
elsif !File.file?(@file)
|
||||||
# Validate that file exists
|
errors << "Disk file '#{@file}' for disk '#{@name}' on machine '#{machine.name}' does not exist."
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue