Skip to content

Commit

Permalink
run.sh: respect $VIRTUAL_ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
classabbyamp committed May 17, 2024
1 parent 308dfd7 commit 6f9e62e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.5.0.
- `run.sh` to respect the `VIRTUAL_ENV` environment variable.


## [2.9.2] - 2023-12-15
Expand Down
9 changes: 3 additions & 6 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@
# https://github.com/0x5c/quick-bot-no-pain


# If $BOTENV is not defined, default to 'botenv'
if [ -z "$BOTENV" ]; then
BOTENV='botenv'
fi

: "${BOTENV:=./botenv}"
: "${VIRTUAL_ENV:="$BOTENV"}"

# Argument handling
_PASS_ERRORS=0
Expand Down Expand Up @@ -71,7 +68,7 @@ while true; do
if [ $_NO_BOTENV -eq 1 ]; then
"$PYTHON_BIN" main.py "$@"
else
"./$BOTENV/bin/python3" main.py "$@"
"$VIRTUAL_ENV/bin/python3" main.py "$@"
fi
err=$?
_message="$0: The bot exited with [$err]"
Expand Down

0 comments on commit 6f9e62e

Please sign in to comment.