Skip to content

Commit 9b856ef

Browse files
committed
fix(cli): coverage failures throw instead of returning a string
Returning the error text made ERROR: exit 0 on failure. Throw Wheels.CoverageFailed so the runtime maps it to a non-zero exit, matching the typed-error convention used by every other write-side command. The finally block still reverts instrumentation. Signed-off-by: Peter Amiri <peter@alurium.com>
1 parent a488edf commit 9b856ef

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

cli/lucli/Module.cfc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,11 @@ component extends="modules.BaseModule" {
846846
var rows = svc.$analyze(appRoot & "/app", coverage);
847847
return svc.$report(rows, opts.top, instrumented, suite.status);
848848
} catch (any e) {
849-
return "Coverage run failed: " & e.message & " " & (e.detail ?: "");
849+
throw(
850+
type = "Wheels.CoverageFailed",
851+
message = e.message,
852+
detail = e.detail ?: ""
853+
);
850854
} finally {
851855
svc.$revert(appRoot & "/app");
852856
}

0 commit comments

Comments
 (0)