1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 12:06:45 +00:00

fix: resolve version tag normalization bug (VV prefix) and improve network detection

This commit is contained in:
Tw93
2025-12-29 22:29:01 +08:00
parent c962b6f4b9
commit 3fd1dbe89a

View File

@@ -440,14 +440,8 @@ download_binary() {
local url="https://github.com/tw93/mole/releases/download/V${version}/${binary_name}-darwin-${arch_suffix}"
# Only attempt download if we have internet
if ! curl --connect-timeout 2 -s https://github.com > /dev/null; then
log_warning "No internet connection, trying local build for ${binary_name}"
if build_binary_from_source "$binary_name" "$target_path"; then
return 0
fi
log_error "Failed to install ${binary_name} binary (offline)"
return 1
fi
# Note: Skip network check and let curl download handle connectivity issues
# This avoids false negatives from strict 2-second timeout
if [[ -t 1 ]]; then
start_line_spinner "Downloading ${binary_name}..."