From 728dbe5a4ff9f8176028932051e3632f89563de8 Mon Sep 17 00:00:00 2001 From: Remco Vermeulen Date: Wed, 14 Mar 2012 12:02:31 +0100 Subject: [PATCH] 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. --- lib/vagrant/config/ssh.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vagrant/config/ssh.rb b/lib/vagrant/config/ssh.rb index c3260fddb..898f7bfe3 100644 --- a/lib/vagrant/config/ssh.rb +++ b/lib/vagrant/config/ssh.rb @@ -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