File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,15 @@ download_binary() {
106106 print_info " Downloading Hindsight CLI ${version} for $platform ..." >&2
107107
108108 if command -v curl > /dev/null 2>&1 ; then
109- curl -fsSL " $download_url " -o " $tmp_file "
109+ # GitHub returns 302 redirect to Azure blob storage
110+ # curl -L sometimes fails with 503, so manually handle redirect
111+ local redirect_url=$( curl -sI " $download_url " 2> /dev/null | grep -i " ^location:" | sed ' s/location: //i' | tr -d ' \r\n' )
112+ if [[ -n " $redirect_url " ]]; then
113+ curl -fsSL " $redirect_url " -o " $tmp_file "
114+ else
115+ # Fallback to direct download if no redirect
116+ curl -fsSL " $download_url " -o " $tmp_file "
117+ fi
110118 elif command -v wget > /dev/null 2>&1 ; then
111119 wget -q " $download_url " -O " $tmp_file "
112120 else
You can’t perform that action at this time.
0 commit comments