From 0e8ded18aa23604f0afb2dd37a9ebf50c2967ea1 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Wed, 17 Nov 2021 14:51:20 -0800 Subject: [PATCH] Add significant weight to non-direct type matches --- plugins/commands/serve/mappers/internal/graph.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/commands/serve/mappers/internal/graph.rb b/plugins/commands/serve/mappers/internal/graph.rb index 47ed2af71..c8e16735f 100644 --- a/plugins/commands/serve/mappers/internal/graph.rb +++ b/plugins/commands/serve/mappers/internal/graph.rb @@ -203,7 +203,7 @@ module VagrantPlugins w = edges.map(&:weight).inject(&:+) if edges.first.respond_to?(:type) && edges.last.respond_to?(:type) if edges.first.type != edges.last.type - w += 1 + w += 200 extra = edges.first.type.ancestors.index(edges.last.type) if extra.nil? extra = edges.last.type.ancestors.index(edges.first.type)