mirror of
https://github.com/logos-blockchain/logos-blockchain-testing.git
synced 2026-01-07 15:53:10 +00:00
Harden nomos-circuits download/extract
This commit is contained in:
parent
f9fce36c5c
commit
8c6690f7d5
@ -110,7 +110,7 @@ download_release() {
|
|||||||
print_info "URL: $url"
|
print_info "URL: $url"
|
||||||
|
|
||||||
# Build curl command with optional authentication
|
# Build curl command with optional authentication
|
||||||
local curl_cmd="curl -L"
|
local curl_cmd="curl -fL --retry 5 --retry-delay 2 --retry-all-errors"
|
||||||
if [ -n "$GITHUB_TOKEN" ]; then
|
if [ -n "$GITHUB_TOKEN" ]; then
|
||||||
curl_cmd="$curl_cmd --header 'authorization: Bearer ${GITHUB_TOKEN}'"
|
curl_cmd="$curl_cmd --header 'authorization: Bearer ${GITHUB_TOKEN}'"
|
||||||
fi
|
fi
|
||||||
@ -126,6 +126,13 @@ download_release() {
|
|||||||
|
|
||||||
print_success "Download complete"
|
print_success "Download complete"
|
||||||
|
|
||||||
|
# Validate archive before extracting
|
||||||
|
if ! tar -tzf "${temp_dir}/${artifact}" >/dev/null 2>&1; then
|
||||||
|
print_error "Downloaded archive is not a valid tar.gz: ${temp_dir}/${artifact}"
|
||||||
|
rm -rf "$temp_dir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
print_info "Extracting to ${INSTALL_DIR}..."
|
print_info "Extracting to ${INSTALL_DIR}..."
|
||||||
mkdir -p "$INSTALL_DIR"
|
mkdir -p "$INSTALL_DIR"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user