mirror of
https://github.com/morluto/rea.git
synced 2026-12-05 14:31:22 +00:00
refactor(process): read execFile's abort through the signal owner
This commit is contained in:
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
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user