core: fix potential exception case in SSHExec middleware
This commit is contained in:
parent
b3a9e6a088
commit
074bb2c7fb
|
@ -28,11 +28,11 @@ module Vagrant
|
||||||
# not yet ready for SSH, so we raise this exception.
|
# not yet ready for SSH, so we raise this exception.
|
||||||
raise Errors::SSHNotReady if info.nil?
|
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|
|
# Check SSH key permissions
|
||||||
SSH.check_key_permissions(Pathname.new(path))
|
info[:private_key_path].each do |path|
|
||||||
end
|
SSH.check_key_permissions(Pathname.new(path))
|
||||||
end
|
end
|
||||||
|
|
||||||
if info[:private_key_path].empty? && info[:password]
|
if info[:private_key_path].empty? && info[:password]
|
||||||
|
|
Loading…
Reference in New Issue