mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 14:26: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}"
|
local url="https://github.com/tw93/mole/releases/download/V${version}/${binary_name}-darwin-${arch_suffix}"
|
||||||
|
|
||||||
# Only attempt download if we have internet
|
# Only attempt download if we have internet
|
||||||
if ! curl --connect-timeout 2 -s https://github.com > /dev/null; then
|
# Note: Skip network check and let curl download handle connectivity issues
|
||||||
log_warning "No internet connection, trying local build for ${binary_name}"
|
# This avoids false negatives from strict 2-second timeout
|
||||||
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
|
|
||||||
|
|
||||||
if [[ -t 1 ]]; then
|
if [[ -t 1 ]]; then
|
||||||
start_line_spinner "Downloading ${binary_name}..."
|
start_line_spinner "Downloading ${binary_name}..."
|
||||||
|
|||||||
Reference in New Issue
Block a user