From a0797da229a41da7f380d1989b48a265633db34f Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Wed, 17 Nov 2021 14:53:15 -0800 Subject: [PATCH] Argument is only invalid if nil and expected type is not NilClass --- plugins/commands/serve/mappers/mapper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/commands/serve/mappers/mapper.rb b/plugins/commands/serve/mappers/mapper.rb index 1be596fb2..fa3273812 100644 --- a/plugins/commands/serve/mappers/mapper.rb +++ b/plugins/commands/serve/mappers/mapper.rb @@ -176,7 +176,7 @@ module VagrantPlugins value = args.detect do |arg| input.valid?(arg) end - if !value + if value.nil? && input.type != NilClass raise ArgumentError, "Failed to locate required argument of type `#{input.type}'" end