From 9379f1beb3e6cae986ae568cff9b476ebf1d27e0 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Tue, 20 Jul 2021 15:51:02 -0700 Subject: [PATCH] Properly handle direct plugin connection without broker --- plugins/commands/serve/client/terminal.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/commands/serve/client/terminal.rb b/plugins/commands/serve/client/terminal.rb index 9da376471..6e77d103d 100644 --- a/plugins/commands/serve/client/terminal.rb +++ b/plugins/commands/serve/client/terminal.rb @@ -9,7 +9,13 @@ module VagrantPlugins def self.load(raw_terminal, broker:) t = SDK::Args::TerminalUI.decode(raw_terminal) - conn = broker.dial(t.stream_id) + if(t.target.to_s.empty?) + conn = broker.dial(t.stream_id) + else + conn = t.target.to_s.start_with?('/') ? + "unix:#{t.target}" : + t.target.to_s + end self.new(conn.to_s) end