refactor(process): read execFile's abort through the signal owner

This commit is contained in:
morluto committed 2026-11-15 05:20:41 -05:00
1 parent 8d914f50c9
commit bf4cd9d684
2 files changed
+4 -3

No files matched your search

@@ -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
}
+4 -2
View File
@@ -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,