mirror of
https://github.com/miaowware/qrm2.git
synced 2024-11-29 03:08:50 -05:00
run.sh: respect $VIRTUAL_ENV
This commit is contained in:
parent
9db042c09d
commit
fbe64df14d
@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
## [Unreleased]
|
||||
### Changed
|
||||
- Updated Pycord to 2.6.0.
|
||||
- `run.sh` to respect the `VIRTUAL_ENV` environment variable.
|
||||
|
||||
|
||||
## [2.9.2] - 2023-12-15
|
||||
|
10
run.sh
10
run.sh
@ -8,11 +8,13 @@
|
||||
# https://github.com/0x5c/quick-bot-no-pain
|
||||
|
||||
|
||||
# If $BOTENV is not defined, default to 'botenv'
|
||||
if [ -z "$BOTENV" ]; then
|
||||
BOTENV='botenv'
|
||||
if [ -n "$VIRTUAL_ENV" ]; then
|
||||
BOTENV="$VIRTUAL_ENV"
|
||||
fi
|
||||
|
||||
if [ -z "$BOTENV" ]; then
|
||||
BOTENV='./botenv'
|
||||
fi
|
||||
|
||||
# Argument handling
|
||||
_PASS_ERRORS=0
|
||||
@ -71,7 +73,7 @@ while true; do
|
||||
if [ $_NO_BOTENV -eq 1 ]; then
|
||||
"$PYTHON_BIN" main.py "$@"
|
||||
else
|
||||
"./$BOTENV/bin/python3" main.py "$@"
|
||||
"$BOTENV/bin/python3" main.py "$@"
|
||||
fi
|
||||
err=$?
|
||||
_message="$0: The bot exited with [$err]"
|
||||
|
Loading…
Reference in New Issue
Block a user