From bf4cd9d684a81d4428ff7733edbdf146e5d8396c Mon Sep 17 00:00:00 2001 From: morluto <76467478+morluto@users.noreply.github.com> Date: Sun, 15 Nov 2026 05:20:41 -0500 Subject: [PATCH] refactor(process): read execFile's abort through the signal owner --- scripts/verify/architecture-guard-baselines.json | 1 - src/process/ExecFileOutput.ts | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/verify/architecture-guard-baselines.json b/scripts/verify/architecture-guard-baselines.json index 35b688f8a0a..d8b926889b1 100644 --- a/scripts/verify/architecture-guard-baselines.json +++ b/scripts/verify/architecture-guard-baselines.json @@ -390,7 +390,6 @@ "abort-error-name": { "src/evm/EvmoleInterfaceProvider.ts": 1, "src/ida/IdaBusyHealth.ts": 1, - "src/process/ExecFileOutput.ts": 1, "src/server/http/listenHttpServer.ts": 1, "src/sqlite/SqliteDatabaseFailures.ts": 1 } diff --git a/src/process/ExecFileOutput.ts b/src/process/ExecFileOutput.ts index 0ca2d3a2197..1f935fd28c2 100644 --- a/src/process/ExecFileOutput.ts +++ b/src/process/ExecFileOutput.ts @@ -1,4 +1,5 @@ import type { AnalysisCapturedOutput } from "../domain/analysisErrorBase.js"; +import { isAbortOf } from "./SignalAbort.js"; import { execFile, spawn, @@ -241,8 +242,9 @@ export const execFileBytes = ( }, (error, stdout, stderr) => complete( - error?.name === "AbortError" && error.code === "ABORT_ERR" - ? new ExecFileOutputCancelledError(error.cause) + // execFile's own abort for the caller's signal carries its reason. + isAbortOf(error, signal) + ? new ExecFileOutputCancelledError(signal.reason) : error, stdout, stderr,