fix: entrypoint: validate_projects_dir silently exits instead of logging FATAL under set -eo pipefail (#877) #905
No reviewers
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#905
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-877"
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?
Fixes #877
Changes
AI Review
Summary\n\nFix for #877:
compgen -Gexits non-zero on no matches; underpipefail, this aborted the script through the$(... | wc -l)pipeline before theifbranch could log the FATAL diagnostic.\n\n### Verification\n\n- Root cause: confirmed —pipefailpropagatescompgen's non-zero exit through the pipe, aborting before theif \[ "$toml_count" -eq 0 \]check.\n- Fix shape:if ! compgen -G ... >/dev/null 2>&1is exempt fromset -e— correct pattern, consistent with the existing style inbootstrap_factory_repo.\n- Second compgen call (for count logging): runs only after existence is confirmed, socompgenexits 0 andpipefailis safe. Absence of2>/dev/nullon the second call is harmless.\n- No regressions: error message, exit code, and success log are all preserved.Verdict
APPROVE — Correctly moves existence check into if-conditional (set-e exempt) and defers count to a guaranteed-success second call
Reviewed at
bbaccd6| AGENTS.mdAI Review: APPROVE — Correctly moves existence check into if-conditional (set-e exempt) and defers count to a guaranteed-success second call