mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-26 00:41:57 +00:00
Merge commit '1db7094966bc86658166709db26b7750d8fc2821'
This commit is contained in:
commit
e27a8fbcbf
1 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue