Skip to content

fix(cli): guard every bootstrap load, not just the env-var one - #1182

Merged
Chemaclass merged 1 commit into
mainfrom
fix/1181-env-flag-bootstrap-silent
Aug 13, 2026
Merged

fix(cli): guard every bootstrap load, not just the env-var one#1182
Chemaclass merged 1 commit into
mainfrom
fix/1181-env-flag-bootstrap-silent

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

🤔 Background

Related #1181

#1180 fixed the BASHUNIT_BOOTSTRAP path. The --env/--boot flag sources
its file at different call sites and kept the same hole:

$ bashunit --no-parallel --env boot.sh t_test.sh
boot.sh: line 1: syntax error near unexpected token `{'
$ echo $?
0

No tests, no summary, exit 0 — and bench --boot the same. The flag path
validated that the file exists (#875) but cannot check that sourcing
succeeded: source is a special builtin, so the shell ends right there.

💡 Changes

#1180 covered the BASHUNIT_BOOTSTRAP path. The --env/--boot flag sources its
file at other call sites, which kept the same hole: a syntax error there still
gave exit 0 with no tests and no summary, and bench --boot behaved the same.

The flag path validated that the file exists (#875) but could not check that
sourcing succeeded -- source is a special builtin, so the shell ends at that
point. Apply the same marker to the remaining sites.

Audited afterwards: 5 of 5 bootstrap source sites carry the marker.

Closes #1181
@Chemaclass Chemaclass added the bug Something isn't working label Aug 13, 2026
@Chemaclass Chemaclass self-assigned this Aug 13, 2026
@Chemaclass
Chemaclass merged commit dbf4340 into main Aug 13, 2026
37 checks passed
@Chemaclass
Chemaclass deleted the fix/1181-env-flag-bootstrap-silent branch August 13, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant