mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-24 21:20:07 +00:00
Squashed 'gitstatus/' changes from cd5673b4..d3bc3e34
d3bc3e34 work around bugs in curl on cygwin; see #706 61a67c66 print error message from curl/wget before the summary git-subtree-dir: gitstatus git-subtree-split: d3bc3e346cc71ee1a29d0c4316449feb3dcb3116
This commit is contained in:
parent
d047ed87a1
commit
1db7094966
1 changed files with 5 additions and 3 deletions
8
install
8
install
|
@ -207,15 +207,17 @@ END
|
||||||
local url="https://github.com/romkatv/gitstatus/releases/download/$version/$file.tar.gz"
|
local url="https://github.com/romkatv/gitstatus/releases/download/$version/$file.tar.gz"
|
||||||
local archive="$cache_dir"/"$file".tmp.$$.tar.gz
|
local archive="$cache_dir"/"$file".tmp.$$.tar.gz
|
||||||
if command -v curl >/dev/null 2>&1; then
|
if command -v curl >/dev/null 2>&1; then
|
||||||
if ! err="$(command curl -fsSLo "$archive" -- "$url" 2>&1)"; then
|
# `cd` is a workaround for Cygwin. It cannot handle -o with slashes.
|
||||||
>&2 echo "[gitstatus] error: failed to download gitstatusd: $url"
|
if ! err="$(cd ${ZSH_VERSION:+-q} -- "$cache_dir" 2>&1 &&
|
||||||
|
command curl -fsSLo "${archive##*/}" -- "$url" 2>&1)"; then
|
||||||
>&2 printf "%s\n" "$err"
|
>&2 printf "%s\n" "$err"
|
||||||
|
>&2 echo "[gitstatus] error: failed to download gitstatusd: $url"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
elif command -v wget >/dev/null 2>&1; then
|
elif command -v wget >/dev/null 2>&1; then
|
||||||
if ! err="$(command wget -O "$archive" -- "$url" 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 printf "%s\n" "$err"
|
||||||
|
>&2 echo "[gitstatus] error: failed to download gitstatusd: $url"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue