Make sure that the private_key_path is expanded before checking existence.

This allows for paths like ~/.ssh/some_key to be defined in the Vagrantfile.
This commit is contained in:
Remco Vermeulen 2012-03-14 12:02:31 +01:00
parent f82750e311
commit 728dbe5a4f
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ module Vagrant
errors.add(I18n.t("vagrant.config.common.error_empty", :field => field)) if !instance_variable_get("@#{field}".to_sym)
end
if private_key_path && !File.file?(private_key_path)
if private_key_path && !File.file?(File.expand_path(private_key_path))
errors.add(I18n.t("vagrant.config.ssh.private_key_missing", :path => private_key_path))
end
end