Fix deploy stdin token handling

This commit is contained in:
2569718930@qq.com
2026-06-01 14:44:53 +08:00
parent 6407d0a29d
commit 2fd8027a41
3 changed files with 7 additions and 3 deletions
+5 -1
View File
@@ -7,7 +7,11 @@ COMPOSE_DIR="/root/PolyWeather"
LOCK_FILE="${POLYWEATHER_DEPLOY_LOCK_FILE:-/var/lock/polyweather-deploy.lock}"
GHCR_PAT=""
if ! IFS= read -r GHCR_PAT || [ -z "$GHCR_PAT" ]; then
if ! IFS= read -r GHCR_PAT && [ -z "$GHCR_PAT" ]; then
echo "❌ GHCR token must be provided on stdin"
exit 1
fi
if [ -z "$GHCR_PAT" ]; then
echo "❌ GHCR token must be provided on stdin"
exit 1
fi