Skip to content

Commit

Permalink
Merge commit '1db7094966bc86658166709db26b7750d8fc2821'
Browse files Browse the repository at this point in the history
  • Loading branch information
romkatv committed May 11, 2020
2 parents 1a976f9 + 1db7094 commit e27a8fb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions gitstatus/install
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,17 @@ END
local url="https://github.com/romkatv/gitstatus/releases/download/$version/$file.tar.gz"
local archive="$cache_dir"/"$file".tmp.$$.tar.gz
if command -v curl >/dev/null 2>&1; then
if ! err="$(command curl -fsSLo "$archive" -- "$url" 2>&1)"; then
>&2 echo "[gitstatus] error: failed to download gitstatusd: $url"
# `cd` is a workaround for Cygwin. It cannot handle -o with slashes.
if ! err="$(cd ${ZSH_VERSION:+-q} -- "$cache_dir" 2>&1 &&
command curl -fsSLo "${archive##*/}" -- "$url" 2>&1)"; then
>&2 printf "%s\n" "$err"
>&2 echo "[gitstatus] error: failed to download gitstatusd: $url"
return 1
fi
elif command -v wget >/dev/null 2>&1; then
if ! err="$(command wget -O "$archive" -- "$url" 2>&1)"; then
>&2 echo "[gitstatus] error: failed to download gitstatusd: $url"
>&2 printf "%s\n" "$err"
>&2 echo "[gitstatus] error: failed to download gitstatusd: $url"
return 1
fi
else
Expand Down

0 comments on commit e27a8fb

Please sign in to comment.