fix(dsh-plugin-browserskill): report interrupt-killed commands as interrupted

A child killed via killFor (overlay interrupt) exits with a null code
and empty output, which used to render as a duplicated 'bsk x failed:
bsk x failed'. Report it as interrupted instead.
This commit is contained in:
BB-fat
2026-08-14 07:01:44 +00:00
parent e2d07574d7
commit dde707b558
2 changed files with 9 additions and 0 deletions
@@ -117,6 +117,10 @@ describe("parseBskJson", () => {
expect(() => parseBskJson({ ...base, code: 1, stderr: "boom" }, "x")).toThrow(/boom/);
});
it("reports killed-by-interrupt children (null exit code) as interrupted", () => {
expect(() => parseBskJson({ ...base, code: null }, "navigate")).toThrow(/interrupted/);
});
it("reports timeouts distinctly", () => {
expect(() => parseBskJson({ ...base, timedOut: true }, "x")).toThrow(/timed out/);
});