From a6b29c80519d40d593531340b9d5965a9606bd81 Mon Sep 17 00:00:00 2001 From: Ted Johnson Date: Wed, 17 Jan 2024 15:52:01 -0700 Subject: [PATCH 1/2] Detect missing curl package before continuing past failure. When curl is missing, as is the default on Ubuntu, we blow right past the curl failure and try to run commands. Clean this up just a tad by detecting a missing curl command. --- bootstrap.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bootstrap.sh b/bootstrap.sh index fa8b47b34c..47aed3bc6f 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -105,6 +105,11 @@ else get_pip_url="https://bootstrap.pypa.io/pip/3.6/get-pip.py" fi +if ! type "curl" > /dev/null 2>&1; then + echo "curl is missing; install curl and try again" + exit 1 +fi + INFO "curl -s $get_pip_url | $python" curl -s $get_pip_url | $python From 4cf84a6a7d45ad8cfd149d97d5bd572509d6e9ed Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Fri, 19 Jan 2024 22:18:15 +0100 Subject: [PATCH 2/2] Fine tune error message --- bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap.sh b/bootstrap.sh index 47aed3bc6f..d63d571e02 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -106,7 +106,7 @@ else fi if ! type "curl" > /dev/null 2>&1; then - echo "curl is missing; install curl and try again" + echo -e "could not find \`curl': please install curl and try again" exit 1 fi