From 8e26495189293f6f02969081c59324d5a556d877 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Mon, 5 Jun 2023 17:32:14 -0700 Subject: [PATCH] Project client and proc mapper fixes Default the options for default provider so an options value is not required when calling. The index for the proc lookup should use the key method, not index. --- plugins/commands/serve/client/project.rb | 2 +- plugins/commands/serve/mappers/proc.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/commands/serve/client/project.rb b/plugins/commands/serve/client/project.rb index 5a224580c..329776f01 100644 --- a/plugins/commands/serve/client/project.rb +++ b/plugins/commands/serve/client/project.rb @@ -54,7 +54,7 @@ module VagrantPlugins resp.path end - def default_provider(opts) + def default_provider(opts={}) req = ::Hashicorp::Vagrant::Sdk::Project::DefaultProviderRequest.new( exclude: opts.fetch(:exclude, []), force_default: opts.fetch(:force_default, true), diff --git a/plugins/commands/serve/mappers/proc.rb b/plugins/commands/serve/mappers/proc.rb index a712dc377..631ab2548 100644 --- a/plugins/commands/serve/mappers/proc.rb +++ b/plugins/commands/serve/mappers/proc.rb @@ -19,7 +19,7 @@ module VagrantPlugins end # If this is already stored, return existing ID - idx = @stored.index(value) + idx = @stored.key(value) return idx if idx # Create a new ID and store