diff --git a/scripts/install.sh b/scripts/install.sh index b5470cc..15aa1ef 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -46,8 +46,11 @@ fi echo "Installing heartbeat $what" if [ ! -d $venv/hbd ]; then + set +e python3 -m pip --version > /dev/null 2>&1 - if [ $? -ne 0 ]; then + rc=$? + set -e + if [ $rc -ne 0 ]; then # truenas does not have pip installed by default, so we need to fetch get-pip.py and install pip echo "pip is not installed, fetching get-pip.py and installing pip" arg="--without-pip"