use __check_command_exists to check if cmd exists

This commit is contained in:
Ch3LL 2017-05-23 12:32:50 -04:00
parent 273ee661a9
commit 19d88386a1
No known key found for this signature in database
GPG key ID: E913CB5901E0C81C

View file

@ -4539,8 +4539,10 @@ install_amazon_linux_ami_git_deps() {
fi
PIP_EXE='pip'
if [ $(command -v python2.7) ]; then
[ $(which pip2.7) ] || /usr/bin/easy_install-2.7 pip || return 1
if __check_command_exists python2.7; then
if ! __check_command_exists pip2.7; then
/usr/bin/easy_install-2.7 pip || return 1
fi
PIP_EXE='/usr/local/bin/pip2.7'
_PY_EXE='python2.7'
fi