Skip to content

Commit

Permalink
install.sh: print out tar version when the flag is supported (npm#154)
Browse files Browse the repository at this point in the history
not all the tar implementations support --version flag
e.g. the one used in openbsd doesn't, so the installation process fails

PR-URL: npm#154
Credit: @agudulin
Reviewed-By: @zkat
  • Loading branch information
agudulin authored and zkat committed Feb 18, 2019
1 parent cf09fba commit 774fc26
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 774fc26

Please sign in to comment.