File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
plugins/commands/serve/service Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ def initialize
14
14
@registered = [ ]
15
15
end
16
16
17
+ def initialize_clone ( org )
18
+ super
19
+ @registered = org . registered . dup
20
+ end
21
+
17
22
# This returns all the action hooks.
18
23
#
19
24
# @return [Array]
Original file line number Diff line number Diff line change @@ -58,9 +58,21 @@ def get_global_plugins(req, _)
58
58
59
59
def get_local_plugins ( req , _ )
60
60
env = vagrant_env ( req . project_path )
61
- plugin_manager = Vagrant ::Plugin ::V2 ::Plugin . local_manager
62
61
localized_plugins = Vagrant ::Plugin ::Manager . instance . localize! ( env )
63
62
Vagrant ::Plugin ::Manager . instance . load_plugins ( localized_plugins )
63
+ plugin_manager = Vagrant ::Plugin ::V2 ::Plugin . local_manager . clone
64
+
65
+ # TODO: do this better
66
+ to_remove = [ ]
67
+ plugin_manager . registered . each do |p |
68
+ if p . inspect . start_with? ( "VagrantPlugins" )
69
+ to_remove << p
70
+ end
71
+ end
72
+ to_remove . each do |p |
73
+ plugin_manager . unregister ( p )
74
+ end
75
+
64
76
extract_plugin_protos ( plugin_manager )
65
77
end
66
78
You can’t perform that action at this time.
0 commit comments