Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gudulin <alexandr.gudulin@gmail.com>2019-02-19 01:25:10 +0300
committerKat Marchán <kzm@zkat.tech>2019-02-19 01:32:17 +0300
commit774fc26eeb01345c11bd8c97e2c4f328d419d9b5 (patch)
tree0fbfb77aa49c742ab802715c776a2fb59d44c8dc /scripts
parentcf09fbaed489d908e9b551382cc5f61bdabe99a9 (diff)
install.sh: print out tar version when the flag is supported (#154)
not all the tar implementations support --version flag e.g. the one used in openbsd doesn't, so the installation process fails PR-URL: https://github.com/npm/cli/pull/154 Credit: @agudulin Reviewed-By: @zkat
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/install.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/install.sh b/scripts/install.sh
index e352e55ca..4ed1062aa 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -98,8 +98,10 @@ fi
if [ $ret -eq 0 ] && [ -x "$tar" ]; then
echo "tar=$tar"
- echo "version:"
- $tar --version
+ if [ $tar --version > /dev/null 2>&1 ]; then
+ echo "version:"
+ $tar --version
+ fi
ret=$?
fi