improved to only try installing Travis if gem command is found

pull/2/head
Hari Sekhon 7 years ago
parent bae6a41e64
commit 7f8ed3cae6

@ -34,9 +34,19 @@ elif is_inside_docker; then
else else
# sometimes ~/.gem/ruby/<version>/bin may not be in $PATH but this succeeds anyway if hashed in shell # sometimes ~/.gem/ruby/<version>/bin may not be in $PATH but this succeeds anyway if hashed in shell
#which travis &>/dev/null || #which travis &>/dev/null ||
type travis &>/dev/null || if ! type travis &>/dev/null; then
gem install travis --no-rdoc --no-ri if which gem; then
travis lint gem install travis --no-rdoc --no-ri
else
echo "WARNING: skipping Travis install as gem command was not found in \$PATH"
echo
fi
fi
if type travis &>/dev/null; then
travis lint
else
echo "WARNING: skipping Travis check as Travis is not installed"
fi
fi fi
echo echo

Loading…
Cancel
Save