Argument is only invalid if nil and expected type is not NilClass
This commit is contained in:
parent
4b14221be4
commit
a0797da229
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user