File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ create_venv() {
17
17
18
18
# Check that Python version supports venv
19
19
if ! python -c ' import venv' 1> /dev/null 2> /dev/null; then
20
- echo " \033[1;33mWARNING : Python version must be > 3.3 to create a virtual environment.\033[0m "
20
+ echo " WARNING : Python version must be > 3.3 to create a virtual environment."
21
21
touch " $STATE_FILE "
22
22
exit 1
23
23
fi
@@ -31,15 +31,19 @@ if [ -d "$VENV_DIR" ]; then
31
31
exit 0
32
32
fi
33
33
if ! is_devbox_venv " $VENV_DIR " ; then
34
- echo " \033[1;33mWARNING: Virtual environment at $VENV_DIR doesn't use Devbox Python.\033[0m"
35
- read -p " Do you want to overwrite it? (y/n) " -n 1 -r
34
+ echo " WARNING: Virtual environment at $VENV_DIR doesn't use Devbox Python."
35
+ echo " Do you want to overwrite it? (y/n)"
36
+ read reply
36
37
echo
37
- if [[ $REPLY =~ ^[Yy]$ ]]; then
38
+ if [[ $reply =~ ^[Yy]$ ]]; then
38
39
echo " Overwriting existing virtual environment..."
39
40
create_venv
40
- else
41
+ elif [[ $reply =~ ^[Nn]$ ]] ; then
41
42
echo " Using your existing virtual environment. We recommend changing \$ VENV_DIR to a different location"
42
43
touch " $STATE_FILE "
44
+ exit 0
45
+ else
46
+ echo " Invalid input. Exiting..."
43
47
exit 1
44
48
fi
45
49
fi
You can’t perform that action at this time.
0 commit comments