feat(scripts): add timeout and retry resilience flags to curl in install_plugin.sh (#718)

This commit is contained in:
Yash Raj
2026-08-08 13:01:07 +05:30
committed by GitHub
parent a359932d39
commit 7c88f945e1
+2 -2
View File
@@ -18,7 +18,7 @@ validate_command() {
# Function to detect the latest version from GitHub API
get_latest_version() {
local latest_version
latest_version="$(curl -s "${api_repo}" | grep -oE '"name": "v[^"]+' | cut -d 'v' -f 2)"
latest_version="$(curl --connect-timeout 15 --retry 3 -s "${api_repo}" | grep -oE '"name": "v[^"]+' | cut -d 'v' -f 2)"
echo "$latest_version"
}
@@ -31,7 +31,7 @@ install_plugin() {
# Download the plugin archive
if validate_command "curl"; then
curl --fail -sSL "${plugin_url}" -o "${plugin_filename}"
curl --connect-timeout 15 --retry 3 --fail -sSL "${plugin_url}" -o "${plugin_filename}"
elif validate_command "wget"; then
wget -q "${plugin_url}" -O "${plugin_filename}"
else