[__package_pip] detect pip binary

This commit is contained in:
ander 2020-09-18 19:33:36 +03:00
parent 2885c6a248
commit decc0ad54d
3 changed files with 17 additions and 2 deletions

View file

@ -0,0 +1,10 @@
#!/bin/sh -e
for bin in pip3 pip
do
if check="$( command -v "$bin" )"
then
echo "$check"
break
fi
done

View file

@ -32,7 +32,7 @@ pipparam="$__object/parameter/pip"
if [ -f "$pipparam" ]; then
pip=$(cat "$pipparam")
else
pip="pip"
pip="$( "$__type_explorer/pip" )"
fi
# If there is no pip, it may get created from somebody else.

View file

@ -38,7 +38,12 @@ pipparam="$__object/parameter/pip"
if [ -f "$pipparam" ]; then
pip=$(cat "$pipparam")
else
pip="pip"
pip="$( cat "$__object/explorer/pip" )"
if [ -z "$pip" ]
then
echo 'pip not found in path' >&2
exit 1
fi
fi
runasparam="$__object/parameter/runas"