Skip to content

Commit

Permalink
Add color
Browse files Browse the repository at this point in the history
  • Loading branch information
matmair committed Jun 13, 2024
1 parent 38964d4 commit fb2695d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contrib/packager.io/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# packager.io postinstall script functions
#
Color_Off='\033[0m'
On_Red='\033[41m'

function detect_docker() {
if [ -n "$(grep docker </proc/1/cgroup)" ]; then
Expand Down Expand Up @@ -57,9 +59,11 @@ function detect_python() {

# Ensure python can be executed - abort if not
if [ -z "$(which ${SETUP_PYTHON})" ]; then
echo "${On_Red}"
echo "# Python ${SETUP_PYTHON} not found - aborting!"
echo "# Please ensure python can be executed with the command '$SETUP_PYTHON' by the current user '$USER'."
echo "# If you are using a different python version, please set the environment variable SETUP_PYTHON to the correct command - eg. 'python3.10'."
echo "${Color_Off}"
exit 1
fi
}
Expand Down

0 comments on commit fb2695d

Please sign in to comment.