fix: bootstrap tty reads, preserve CLI args, safe env write

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-11 13:53:31 +08:00
parent 1f36a76ce0
commit 74381edfe6
2 changed files with 27 additions and 16 deletions
+2 -1
View File
@@ -168,7 +168,8 @@ bash "$ROOT_DIR/scripts/enable-panel-https.sh"
rm -f /etc/nginx/sites-enabled/panel /etc/nginx/sites-available/panel
log "安装 Python 面板依赖 ..."
python3 -m venv "$ROOT_DIR/panel/venv"
python3 -m venv --clear "$ROOT_DIR/panel/venv" 2>/dev/null \
|| { rm -rf "$ROOT_DIR/panel/venv"; python3 -m venv "$ROOT_DIR/panel/venv"; }
"$ROOT_DIR/panel/venv/bin/pip" install -q --upgrade pip
"$ROOT_DIR/panel/venv/bin/pip" install -q -r "$ROOT_DIR/panel/requirements.txt"
"$ROOT_DIR/panel/venv/bin/python" -c "import flask" \