Merge pull request #4696 from konstantint/patch-1

core: raise errors if bad key perms/owner [GH-2163]
This commit is contained in:
Mitchell Hashimoto 2014-10-23 09:05:36 -07:00
commit 890dc21791
1 changed files with 9 additions and 0 deletions

View File

@ -85,8 +85,17 @@ module VagrantPlugins
raise
rescue Vagrant::Errors::SSHKeyTypeNotSupported
raise
rescue Vagrant::Errors::SSHKeyBadOwner
# TODO: It would be more polite to check for key ownership/permissions before starting the machine
# so that this exception would never happen (currently it may happen)
raise
rescue Vagrant::Errors::SSHKeyBadPermissions
# TODO: It would be more polite to check for key ownership/permissions before starting the machine
# so that this exception would never happen (currently it may happen)
raise
rescue Vagrant::Errors::VagrantError => e
# Ignore it, SSH is not ready, some other error.
message = e.message
end
# If we have a message to show, then show it. We don't show