mirror of
https://github.com/casjaysdevdocker/gitea
synced 2026-06-24 02:01:03 -04:00
🐛 Fix silent download failure and cosmetic naming bugs 🐛
Fixes three bugs discovered during live container testing. The critical bug was a bash post-increment no-op: `exitCode=$((exitCode++))` assigns the *old* value back to the variable, so exitCode stays 0 even when a download fails. This caused the Docker build to succeed silently when the gitea binary download failed, publishing a broken image to Docker Hub. - rootfs/root/docker/setup/05-custom.sh: change exitCode=$((exitCode++)) to exitCode=$((exitCode + 1)) in both the gitea and act_runner failure handlers - rootfs/usr/local/bin/entrypoint.sh: change CONTAINER_NAME and description from "archlinux" (copied template default) to "gitea" - rootfs/usr/local/etc/docker/init.d/08-gitea.sh: remove leading space from [ -d " /config/ssh" ] path test so the directory existence check is correct .claude/ rootfs/root/docker/setup/05-custom.sh rootfs/usr/local/bin/entrypoint.sh rootfs/usr/local/etc/docker/init.d/08-gitea.sh
This commit is contained in:
@@ -51,7 +51,7 @@ if curl -q -LSsf "$GITEA_URL" -o "/tmp/gitea.$$"; then
|
||||
fi
|
||||
else
|
||||
echo "Failed to download gitea" >&2
|
||||
exitCode=$((exitCode++))
|
||||
exitCode=$((exitCode + 1))
|
||||
fi
|
||||
echo "Downloading act_runner from $ACT_URL"
|
||||
if curl -q -LSsf "$ACT_URL" -o "/tmp/act_runner.$$"; then
|
||||
@@ -60,7 +60,7 @@ if curl -q -LSsf "$ACT_URL" -o "/tmp/act_runner.$$"; then
|
||||
chmod +x "$ACT_BIN_FILE"
|
||||
else
|
||||
echo "Failed to download act_runner" >&2
|
||||
exitCode=$((exitCode++))
|
||||
exitCode=$((exitCode + 1))
|
||||
fi
|
||||
[ -x "$ACT_BIN_FILE" ] && [ -x "$GITEA_BIN_FILE" ] && exitCode=0
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
Reference in New Issue
Block a user