Convert to String earlier in generate-windows-versions.rb

This commit is contained in:
Benoit Daloze
2026-01-18 23:11:22 +01:00
parent 80740b3b13
commit 9f5530874d
+2 -2
View File
@@ -21,7 +21,7 @@ WINDOWS_TOOLCHAIN_VERSIONS_URLS_REGEXPS = [
# Validate all the URLs in the versions json # Validate all the URLs in the versions json
def validate(versions, allowed_urls_regexps) def validate(versions, allowed_urls_regexps)
versions.values.flat_map(&:values).each do |url| versions.values.flat_map(&:values).each do |url|
if allowed_urls_regexps.none? { |regexp| regexp.match? url.to_s } if allowed_urls_regexps.none? { |regexp| regexp.match? url }
raise SecurityError, "Unexpected URL: #{url}" raise SecurityError, "Unexpected URL: #{url}"
end end
end end
@@ -112,7 +112,7 @@ versions.each do |raw_version, archs|
raise "#{toolchain.empty? ? 'no' : 'multiple'} toolchains found for #{raw_version} #{raw_arch}: #{toolchain}" raise "#{toolchain.empty? ? 'no' : 'multiple'} toolchains found for #{raw_version} #{raw_arch}: #{toolchain}"
end end
archs[raw_arch] = URI.join(base_url, toolchain.first[:href]) archs[raw_arch] = URI.join(base_url, toolchain.first[:href]).to_s
end end
end end