Add client access to ui

This commit is contained in:
Chris Roberts 2021-10-29 08:58:40 -07:00 committed by Paul Hinze
parent 7a38f46633
commit 84b9b1650a
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0
2 changed files with 15 additions and 0 deletions

View File

@ -83,6 +83,11 @@ module Vagrant
def rewriting
yield self
end
def to_proto
raise NotImplementedError,
"Vagrant::UI::Interface#to_proto"
end
end
# This is a UI implementation that does nothing.
@ -296,6 +301,14 @@ module Vagrant
@ui = ui
end
def to_proto
@ui.to_proto
end
def client
@ui.client
end
def initialize_copy(original)
super
@ui = original.instance_variable_get(:@ui).dup

View File

@ -1,6 +1,8 @@
module Vagrant
module UI
class Remote < Basic
attr_reader :client
def initialize(client)
super()
@client = client