core: fix potential exception case in SSHExec middleware

This commit is contained in:
Mitchell Hashimoto 2014-01-03 11:19:17 -08:00
parent b3a9e6a088
commit 074bb2c7fb
1 changed files with 5 additions and 5 deletions

View File

@ -28,12 +28,12 @@ module Vagrant
# not yet ready for SSH, so we raise this exception.
raise Errors::SSHNotReady if info.nil?
if info[:private_key_path]
info[:private_key_path] ||= []
# Check SSH key permissions
info[:private_key_path].each do |path|
SSH.check_key_permissions(Pathname.new(path))
end
end
if info[:private_key_path].empty? && info[:password]
env[:ui].warn(I18n.t("vagrant.ssh_exec_password"))