mirror of
https://github.com/kbenestad/ClubLedger.git
synced 2026-06-18 09:44:33 +00:00
Fix run.sh: always run pip install, not only on venv creation
Existing .venv without packages caused ModuleNotFoundError. pip install is a no-op when everything is already up to date, so always running it is safe and ensures deps are present. https://claude.ai/code/session_01JuRTR5Xjx8emQsyerBgGU7
This commit is contained in:
parent
8fa3aca85d
commit
e3af023582
1 changed files with 3 additions and 4 deletions
7
run.sh
7
run.sh
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Run ClubLedger – creates a virtualenv on first run, then starts the server.
|
# Run ClubLedger – creates a virtualenv if needed, ensures deps are installed, starts the server.
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
VENV=".venv"
|
VENV=".venv"
|
||||||
|
|
@ -7,9 +7,8 @@ VENV=".venv"
|
||||||
if [ ! -d "$VENV" ]; then
|
if [ ! -d "$VENV" ]; then
|
||||||
echo "Creating virtual environment..."
|
echo "Creating virtual environment..."
|
||||||
python3 -m venv "$VENV"
|
python3 -m venv "$VENV"
|
||||||
echo "Installing dependencies..."
|
|
||||||
"$VENV/bin/pip" install --quiet -r requirements.txt
|
|
||||||
echo "Done."
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
"$VENV/bin/pip" install --quiet -r requirements.txt
|
||||||
|
|
||||||
exec "$VENV/bin/python" main.py "$@"
|
exec "$VENV/bin/python" main.py "$@"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue