Ensure box metadata has optional arguments

This commit is contained in:
sophia 2022-04-05 15:25:35 -05:00 committed by Paul Hinze
parent 3fde8afe70
commit 7b470d4b25
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ module Vagrant
# IO.
#
# @param [IO] io An IO object to read the metadata from.
def initialize(io)
def initialize(io, **_)
begin
@raw = JSON.load(io)
rescue JSON::ParserError => e

View File

@ -16,7 +16,7 @@ module VagrantPlugins
# @param [String] version The version to return, this can also
# be a constraint.
# @param [Array<String>] (optional) adds a provider constraint to the version
def version(version, provider)
def version(version, provider=[])
opts = []
provider.each do |p|
opts << SDK::BoxMetadata::BoxMetadataOpts.new(name: p)