mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
chore(installer): reorder messages in util script
fail fast if there's a virtualenv activated
This commit is contained in:
parent
03b1cde97d
commit
d47905d2fb
@ -17,8 +17,16 @@ function git_show {
|
|||||||
git show -s --format='%h %s' $1
|
git show -s --format='%h %s' $1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [[ -v "VIRTUAL_ENV" ]]; then
|
||||||
|
# we can't just call 'deactivate' because this function is not exported
|
||||||
|
# to the environment of this script from the bash process that runs the script
|
||||||
|
echo -e "${BRED}A virtual environment is activated. Please deactivate it before proceeding.${RESET}"
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
|
echo
|
||||||
echo -e "${BYELLOW}This script must be run from the installer directory!${RESET}"
|
echo -e "${BYELLOW}This script must be run from the installer directory!${RESET}"
|
||||||
echo "The current working directory is $(pwd)"
|
echo "The current working directory is $(pwd)"
|
||||||
read -p "If that looks right, press any key to proceed, or CTRL-C to exit..."
|
read -p "If that looks right, press any key to proceed, or CTRL-C to exit..."
|
||||||
@ -32,13 +40,6 @@ if ! is_bin_in_path python && is_bin_in_path python3; then
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -v "VIRTUAL_ENV" ]]; then
|
|
||||||
# we can't just call 'deactivate' because this function is not exported
|
|
||||||
# to the environment of this script from the bash process that runs the script
|
|
||||||
echo -e "${BRED}A virtual environment is activated. Please deactivate it before proceeding.${RESET}"
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
VERSION=$(
|
VERSION=$(
|
||||||
cd ..
|
cd ..
|
||||||
python -c "from invokeai.version import __version__ as version; print(version)"
|
python -c "from invokeai.version import __version__ as version; print(version)"
|
||||||
|
Loading…
Reference in New Issue
Block a user