summaryrefslogtreecommitdiffhomepage
path: root/packages/tool-shell/src/shell.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/tool-shell/src/shell.ts')
-rw-r--r--packages/tool-shell/src/shell.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/tool-shell/src/shell.ts b/packages/tool-shell/src/shell.ts
index d96d73e..cc76bca 100644
--- a/packages/tool-shell/src/shell.ts
+++ b/packages/tool-shell/src/shell.ts
@@ -12,6 +12,7 @@ export interface ValidatedArgs {
export interface SpawnResult {
readonly exitCode: number | null;
readonly timedOut: boolean;
+ readonly aborted: boolean;
}
export type SpawnShell = (params: {
@@ -139,7 +140,6 @@ export function createRunShellTool(deps: {
};
let spawnResult: SpawnResult;
- let aborted = false;
try {
spawnResult = await deps.spawn({
@@ -154,7 +154,6 @@ export function createRunShellTool(deps: {
});
} catch (err: unknown) {
if (ctx.signal.aborted) {
- aborted = true;
return buildResult({
exitCode: null,
timedOut: false,
@@ -172,7 +171,7 @@ export function createRunShellTool(deps: {
return buildResult({
exitCode: spawnResult.exitCode,
timedOut: spawnResult.timedOut,
- aborted,
+ aborted: spawnResult.aborted,
output,
cap,
});