Define callbacks which should be run when enabling server mode

This commit is contained in:
Chris Roberts 2021-04-06 15:57:00 -07:00 committed by Paul Hinze
parent cefb514f77
commit 3512028ca4
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -234,6 +234,13 @@ module Vagrant
#
# @return [true]
def self.enable_server_mode!
if !server_mode?
SERVER_MODE_CALLBACKS.each(&:call)
end
@_server_mode = true
end
SERVER_MODE_CALLBACKS = [
->{ Vagrant::Machine.prepend(Vagrant::Machine::Remote) },
].freeze
end