Merge pull request #14522 from Rylan12/api-load-booleans

Properly load booleans from the API
This commit is contained in:
Mike McQuaid 2023-02-06 16:06:15 +01:00 committed by GitHub
commit 1a0f62c5dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -347,8 +347,10 @@ module Cask
from_h_hash_gsubs(value)
elsif value.respond_to? :to_a
from_h_array_gsubs(value)
elsif value.is_a? String
from_h_string_gsubs(value)
else
{ "true" => true, "false" => false }.fetch(value, from_h_string_gsubs(value))
value
end
end
end