Skip to content

Commit 4be45d5

Browse files
samfordchenrui333
andcommitted
cmd/aspell-dictionaries: fix curl_output type error
We recently upgraded `utils/curl` to `typed: strict`, which required us to rework how we handle the return type from some curl methods. I overlooked tap commands, so this fixes a related Sorbet error. Co-authored-by: Rui Chen <rui@chenrui.dev>
1 parent a6ecd82 commit 4be45d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/aspell-dictionaries.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ def run
2222
dictionary_mirror = "https://ftpmirror.gnu.org/aspell/dict"
2323
languages = {}
2424

25-
index_output, = Utils::Curl.curl_output("#{dictionary_url}/0index.html")
25+
index_output = Utils::Curl.curl_output("#{dictionary_url}/0index.html").stdout
2626
index_output.split("<tr><td>").each do |line|
2727
next unless line.start_with?("<a ")
2828

2929
_, language, _, path, = line.split('"')
30-
language.tr!("-", "_")
31-
languages[language] = path
30+
language&.tr!("-", "_")
31+
languages[language] = path if language && path
3232
end
3333

3434
resources = languages.map do |language, path|

0 commit comments

Comments
 (0)