Validate that disk file exists in disk config validate

This commit is contained in:
Brian Cain 2019-11-19 13:14:12 -08:00
parent cd98a8bf64
commit 3a2b4ddef2
No known key found for this signature in database
GPG Key ID: 9FC4639B2E4510A0
1 changed files with 2 additions and 2 deletions

View File

@ -135,8 +135,8 @@ module VagrantPlugins
if @file
if !@file.is_a?(String)
errors << "Config option `file` for #{machine.name} disk config is not a string"
else
# Validate that file exists
elsif !File.file?(@file)
errors << "Disk file '#{@file}' for disk '#{@name}' on machine '#{machine.name}' does not exist."
end
end