entrypoint: validate_projects_dir silently exits instead of logging FATAL under set -eo pipefail #877
Labels
No labels
action
backlog
blocked
bug-report
cannot-reproduce
in-progress
in-triage
needs-triage
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
rejected
reproduced
tech-debt
underspecified
vision
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#877
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Flagged by AI reviewer in PR #875.
Problem
validate_projects_dir()indocker/agents/entrypoint.shuses a command substitution that triggersset -ebefore the intended error-logging branch runs:When no
.tomlfiles are present,compgen -Gexits 1. Withpipefail, the pipeline exits 1.set -ecauses the script to exit beforeif [ "$toml_count" -eq 0 ]is evaluated, so the FATAL diagnostic messages are never printed. The container still fast-fails (correct outcome), but the operator sees no explanation.Every other
compgen -Gusage in the file uses the safer conditional pattern (lines 259, 322).Fix
Replace the
wc -lpattern with:Auto-created from AI review
Affected files
docker/agents/entrypoint.sh— fixvalidate_projects_dir()to use conditional compgen pattern instead ofwc -lpipelineAcceptance criteria
.tomlfiles are present, the FATAL message is printed before the container exitsshellcheckclean