Skip to content

The --env/--boot flag has the same silent-bootstrap failure as #1179 #1181

Description

@Chemaclass

Problem

#1180 fixed the BASHUNIT_BOOTSTRAP env path. The --env / --boot flag
sources its file at different call sites, which still had the 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. bench --boot behaves the same way.

The flag path validates that the file exists (#875) but not that sourcing it
succeeded — and it cannot, inline: source is a POSIX special builtin, so a
syntax error or a bare exit ends the shell at that point.

Fix

Apply the marker from #1180 to the remaining call sites — src/main/test.sh,
src/main/bench.sh, src/main/subcommands.sh — so the EXIT trap reports a
load that never finished.

Audited afterwards: 5 of 5 source "$boot_file" / source "$BASHUNIT_BOOTSTRAP" sites now carry the marker.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions