fix(server): report failing scripts via run.finished only (#4)

A non-zero exit is a normal result (a failed check shows as a cross), not an execution error; publishing run.error showed an error banner for every failed check.
This commit is contained in:
Florian Schmidt
2026-11-16 00:21:17 +01:00
parent d10b2114df
commit b50d49b790
2 changed files with 9 additions and 1 deletions
-1
View File
@@ -121,7 +121,6 @@ export async function executeRun({ config, hub, runId, request, step, rendered,
if (rendered.local) exitCode = await localExec(workdir, rendered.script, env, step.attrs.sudo, timeout, output);
else exitCode = await exec(client!, `cd ${shellQuote(remoteDir!)} && ${step.attrs.sudo ? "sudo -n " : ""}bash -euo pipefail -s`, scriptInput(rendered.script, env), timeout, output);
streams.stdout.end(); streams.stderr.end();
if (exitCode !== 0) hub.publish({ type: "run.error", runId, message: clean(`Script exited with code ${exitCode}`) });
if (captureTooLarge) throw new Error("Captured output exceeds 1 MiB");
if (exitCode === 0) {
for (const name of rendered.artifacts) {