mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 11:31:46 +00:00
fix: resolve version tag normalization bug (VV prefix) and improve network detection
This commit is contained in:
10
install.sh
10
install.sh
@@ -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}..."
|
||||
|
||||
Reference in New Issue
Block a user