Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 692b219

Browse files
committed
Handle command failure better
1 parent 18b5f50 commit 692b219

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ci/tcli/tcli.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,7 @@ func (a Assertable) Assert(t *testing.T, option ...Assertion) {
181181
if exitErr, ok := err.(*exec.ExitError); ok {
182182
result.ExitCode = exitErr.ExitCode()
183183
} else if err != nil {
184-
// TODO: handle this case better
185-
result.ExitCode = -1
184+
slogtest.Fatal(t, "command failed to run", slog.Error(err), slog.F("command", a.cmd))
186185
} else {
187186
result.ExitCode = 0
188187
}

0 commit comments

Comments
 (0)