mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-11 16:14:08 +01:00
Adds Small "How To Fix" Message for Python Bootstrap Error (#94493)
This commit is contained in:
@@ -25,6 +25,12 @@ PythonDir="$Cache/python-$PythonVersion"
|
||||
PythonExe="$PythonDir/python.exe"
|
||||
Log="$Cache/last-command.log"
|
||||
|
||||
# function that prints an error message and exits
|
||||
error_exit() {
|
||||
echo "If you are seeing this message, please try to fix it by running tools/hooks/install.(bat/sh) again."
|
||||
exit 1
|
||||
}
|
||||
|
||||
# If a portable Python for Windows is not present, search on $PATH.
|
||||
if [ "$(uname)" = "Linux" ] || [ ! -f "$PythonExe" ]; then
|
||||
# Strip the "App Execution Aliases" from $PATH. Even if the user installed
|
||||
@@ -55,7 +61,7 @@ if [ "$(uname)" = "Linux" ] || [ ! -f "$PythonExe" ]; then
|
||||
echo "Please install Python from https://www.python.org/downloads/ or using your system's package manager."
|
||||
fi
|
||||
echo
|
||||
exit 1
|
||||
error_exit
|
||||
fi
|
||||
|
||||
# Create a venv and activate it
|
||||
@@ -70,7 +76,7 @@ if [ "$(uname)" = "Linux" ] || [ ! -f "$PythonExe" ]; then
|
||||
PythonExe="$PythonDir/scripts/python3.exe";
|
||||
else
|
||||
echo "bootstrap/python failed to find the python executable inside its virtualenv"
|
||||
exit 1
|
||||
error_exit
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user