Setup guest client when initializing guest

This commit is contained in:
sophia 2021-08-24 14:06:59 -05:00 committed by Paul Hinze
parent 8efc8542b7
commit 7a5d045083
No known key found for this signature in database
GPG key ID: B69DEDF2D55501C0
2 changed files with 4 additions and 9 deletions

View file

@ -12,9 +12,8 @@ module Vagrant
end
def initialize(machine, guests, capabilities)
@capabilities = capabilities
@guests = guests
@machine = machine
@machine = machine
@client = machine.client.guest
@logger = Log4r::Logger.new("vagrant::guest")
end

View file

@ -48,10 +48,6 @@ module Vagrant
@config = config
@data_dir = @client.data_dir
@vagrantfile = vagrantfile
@guest = Guest.new(
self,
Vagrant.plugin("2").manager.guests,
Vagrant.plugin("2").manager.guest_capabilities)
@name = name
@ui_mutex = Mutex.new
@state_mutex = Mutex.new
@ -217,8 +213,8 @@ module Vagrant
def guest
raise Errors::MachineGuestNotReady if !communicate.ready?
if @guest.client.nil?
@guest.client = client.guest
if !@guest
@guest = Guest.new(self, nil, nil)
end
@guest
end