From 8698ebeff6684bb29526606dd5d3c572af67582f Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 12 Apr 2014 16:22:35 -0700 Subject: [PATCH] hosts/windows: use the port when connecting --- plugins/commands/rdp/command.rb | 4 +--- plugins/hosts/windows/cap/rdp.rb | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/commands/rdp/command.rb b/plugins/commands/rdp/command.rb index 0ce3b9c4d..835ab8543 100644 --- a/plugins/commands/rdp/command.rb +++ b/plugins/commands/rdp/command.rb @@ -26,9 +26,7 @@ module VagrantPlugins end rdp_info = get_rdp_info(machine) - if !rdp_info - raise Errors::RDPUndetected - end + raise Errors::RDPUndetected if !rdp_info @env.host.capability(:rdp_client, rdp_info) end diff --git a/plugins/hosts/windows/cap/rdp.rb b/plugins/hosts/windows/cap/rdp.rb index 04dd17da4..96c7eb73e 100644 --- a/plugins/hosts/windows/cap/rdp.rb +++ b/plugins/hosts/windows/cap/rdp.rb @@ -10,8 +10,7 @@ module VagrantPlugins config = nil opts = { "drivestoredirect:s" => "*", - "full address:s" => rdp_info[:host], - "port:i" => rdp_info[:port], + "full address:s" => "#{rdp_info[:host]}:#{rdp_info[:port]}", "prompt for credentials:i" => "1", "username:s" => rdp_info[:username], }