From 46ea7238682642990ef67dd73582e86a2d4e2a2d Mon Sep 17 00:00:00 2001 From: Attila Fazekas Date: Mon, 7 Oct 2013 07:29:27 +0200 Subject: [PATCH] install_pip script fails if pip was not installed 'set -o errexit' recently added to the pip installer script, which causes the script fail when it does not able to find an already installed pip. This change handles the situation when pip is not installed. Change-Id: I18a42d13c4be6699db21ec5b6a095a88a199912d --- tools/install_pip.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/install_pip.sh b/tools/install_pip.sh index 04e18261ac..940bd8c84a 100755 --- a/tools/install_pip.sh +++ b/tools/install_pip.sh @@ -50,10 +50,12 @@ GetDistro echo "Distro: $DISTRO" function get_versions() { - PIP=$(which pip 2>/dev/null || which pip-python 2>/dev/null) + PIP=$(which pip 2>/dev/null || which pip-python 2>/dev/null || true) if [[ -n $PIP ]]; then PIP_VERSION=$($PIP --version | awk '{ print $2}') echo "pip: $PIP_VERSION" + else + echo "pip: Not Installed" fi }