Skip to content

Commit

Permalink
feat: prebuilt binary retry, disable progress, and docs
Browse files Browse the repository at this point in the history
Related to #68
  • Loading branch information
Saghen committed Nov 27, 2024
1 parent 933052b commit bc67391
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lua/blink/cmp/fuzzy/download.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,18 @@ function download.from_github(tag, cb)
.. system_triple
.. download.get_lib_extension()

vim.system({ 'curl', '--create-dirs', '-fLo', download.lib_path, url }, {}, function(out)
vim.system({
'curl',
'--retry=2',
'--retry-connrefused',
'--fail', -- Fail on 4xx/5xx
'--location', -- Follow redirects
'--silent', -- Don't show progress
'--show-error', -- Show errors, even though we're using --silent
'--create-dirs',
'--output=' .. download.lib_path,
url,
}, {}, function(out)
if out.code ~= 0 then return cb('Failed to download pre-build binaries: ' .. out.stderr) end
cb()
end)
Expand Down

0 comments on commit bc67391

Please sign in to comment.