Skip to content

Commit

Permalink
Project client and proc mapper fixes
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
chrisroberts committed Jun 6, 2023
1 parent fd617c4 commit 8e26495
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/commands/serve/client/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def default_private_key
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),
Expand Down
2 changes: 1 addition & 1 deletion plugins/commands/serve/mappers/proc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def register(value)
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
Expand Down

0 comments on commit 8e26495

Please sign in to comment.