core: fix potential exception case in SSHExec middleware
This commit is contained in:
parent
b3a9e6a088
commit
074bb2c7fb
|
@ -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"))
|
||||
|
|
Loading…
Reference in New Issue