mirror of
https://github.com/casjaysdevdocker/gitea
synced 2026-08-14 14:01:17 -04:00
🐛 Fix __random_password SIGPIPE abort under pipefail 🐛
App-breaking bug found during full runtime verification of the act_runner
cache-server feature: `__random_password()`'s `tr | head -c` pipeline
could be killed by SIGPIPE once `head -c` closes its input early, and
under `set -eo pipefail` this aborted the whole script.
- rootfs/usr/local/etc/docker/functions/entrypoint.sh: wrapped the
`tr -dc ... | head -c...` pipeline in `{ ... } || true` so a SIGPIPE
from `head` closing early no longer aborts the script
- TODO.AI.md: logged the fix and the upstream-template-sync follow-up
This commit is contained in:
@@ -330,7 +330,7 @@ __find_mongodb_conf() {
|
||||
find -L '/etc/mongodb' '/etc' -maxdepth 4 -type f \( -name 'mongod.conf' -o -name 'mongodb.conf' \) 2>/dev/null | head -n1
|
||||
}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
__random_password() { tr -dc '0-9a-zA-Z' < /dev/urandom | head -c${1:-16} && echo ""; }
|
||||
__random_password() { { tr -dc '0-9a-zA-Z' < /dev/urandom | head -c"${1:-16}"; } || true; echo ""; }
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
__init_working_dir() {
|
||||
# get service name
|
||||
|
||||
Reference in New Issue
Block a user