commands/rdp: error if RDP info can't be detected

This commit is contained in:
Mitchell Hashimoto 2014-04-12 16:14:58 -07:00
parent 76a7c63f8b
commit 617cf630b1
3 changed files with 15 additions and 3 deletions

View File

@ -30,9 +30,12 @@ module VagrantPlugins
name: machine.guest.name.to_s
end
@env.host.capability(
:rdp_client,
machine.guest.capability(:rdp_info))
rdp_info = machine.guest.capability(:rdp_info)
if !rdp_info
raise Errors::RDPUndetected
end
@env.host.capability(:rdp_client, rdp_info)
end
end
end

View File

@ -13,6 +13,10 @@ module VagrantPlugins
class HostUnsupported < RDPError
error_key(:host_unsupported)
end
class RDPUndetected < RDPError
error_key(:rdp_undetected)
end
end
end
end

View File

@ -19,3 +19,8 @@ en:
an RDP client, please contribute this functionality back
into Vagrant. At the very least, open an issue on how it
could be done and we can handle the integration.
rdp_undetected: |-
RDP connection information for this machine could not be
detected. This is typically caused when we can't find the IP
or port to connect to for RDP. Please verify you're forwarding
an RDP port and that your machine is accessible.