summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2016-07-04 13:00:30 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2016-07-04 13:00:30 +0900
commit64747c2324dec24857d4ae6cdf0e949007438e35 (patch)
treeb30c0435e3629b0601e827c7060441cfd0c29126
parent34965edcdaf9ab363dc0ab3e6f5252328a19178a (diff)
[install] Fix error in install script
Close #608
-rwxr-xr-xinstall3
1 files changed, 2 insertions, 1 deletions
diff --git a/install b/install
index ef0008a0..e0f82e3e 100755
--- a/install
+++ b/install
@@ -1,7 +1,6 @@
#!/usr/bin/env bash
set -u
-set -o pipefail
[[ "$@" =~ --pre ]] && version=0.13.2 pre=1 ||
version=0.13.2 pre=0
@@ -137,10 +136,12 @@ download() {
fi
local url=https://github.com/junegunn/fzf-bin/releases/download/$version/${1}.tgz
+ set -o pipefail
if ! (try_curl $url || try_wget $url); then
binary_error="Failed to download with curl and wget"
return
fi
+ set +o pipefail
if [ ! -f $1 ]; then
binary_error="Failed to download ${1}"