utils/curl: fix false flag handling

This commit is contained in:
Bo Anderson 2021-10-04 18:17:00 +01:00
parent 373b0da4d5
commit c6cddacc5e
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65

View File

@ -305,7 +305,7 @@ module Utils
file = Tempfile.new.tap(&:close)
specs = specs.flat_map do |option, argument|
next if argument == false # No flag.
next [] if argument == false # No flag.
args = ["--#{option.to_s.tr("_", "-")}"]
args << argument unless argument == true # It's a flag.