From bc67391de57ce3e42302b13cccf9dd41207c0860 Mon Sep 17 00:00:00 2001 From: Liam Dyer Date: Wed, 27 Nov 2024 15:48:13 -0500 Subject: [PATCH] feat: prebuilt binary retry, disable progress, and docs Related to #68 --- lua/blink/cmp/fuzzy/download.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lua/blink/cmp/fuzzy/download.lua b/lua/blink/cmp/fuzzy/download.lua index 14089646..8cb9ad44 100644 --- a/lua/blink/cmp/fuzzy/download.lua +++ b/lua/blink/cmp/fuzzy/download.lua @@ -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)