Use remote plugin manager when in server mode

This commit is contained in:
sophia 2021-12-06 13:54:38 -06:00 committed by Paul Hinze
parent d5007d4d85
commit 78fbd12da9
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0
2 changed files with 6 additions and 5 deletions

View File

@ -231,10 +231,6 @@ module Vagrant
# @param [String] component
# @return [Class]
def self.plugin(version, component=nil)
# TODO
if component.nil? && Vagrant.server_mode?
version = "remote"
end
# Build up the key and return a result
key = version.to_s.to_sym
key = [key, component.to_s.to_sym] if component

View File

@ -24,7 +24,12 @@ module Vagrant
#
# @return [V2::Manager]
def self.manager
@manager ||= Manager.new
if Vagrant.server_mode?
@manager ||= Vagrant::Plugin::Remote::Manager.new
else
@manager ||= Manager.new
end
@manager
end
# Returns the {Components} for this plugin.