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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user