Only use GET_PIP_URL when it is set
The logic in scripts/scripts-library.sh was recently changed with respect to installing pip, however the conditional wasn't updated to only use GET_PIP_URL when it is set. This simple commits flips the if statement to use a '-n' (checking if GET_PIP_URL is non-empty instead) of a '-z'. Change-Id: I6ace12f183e944a6cee2d7ab722424152f5eb419
This commit is contained in:
parent
e8098997fc
commit
f5caaffe1b
@ -300,7 +300,7 @@ function get_pip {
|
|||||||
if [ ! "$(which pip)" ]; then
|
if [ ! "$(which pip)" ]; then
|
||||||
|
|
||||||
# If GET_PIP_URL is set, then just use it
|
# If GET_PIP_URL is set, then just use it
|
||||||
if [ -z "${GET_PIP_URL:-}" ]; then
|
if [ -n "${GET_PIP_URL:-}" ]; then
|
||||||
curl --silent ${GET_PIP_URL} > /opt/get-pip.py
|
curl --silent ${GET_PIP_URL} > /opt/get-pip.py
|
||||||
if head -n 1 /opt/get-pip.py | grep python; then
|
if head -n 1 /opt/get-pip.py | grep python; then
|
||||||
python2 /opt/get-pip.py || python /opt/get-pip.py
|
python2 /opt/get-pip.py || python /opt/get-pip.py
|
||||||
|
Loading…
x
Reference in New Issue
Block a user