Skip to content

Commit 192e824

Browse files
koki-developclaude
andcommitted
fix: Handle nullable run field in sandbox execution result
Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 17f591e commit 192e824

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/commands/run.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,17 @@ export function registerRunCommand(program: Command): void {
102102
) {
103103
process.stderr.write(result.data.compile.output);
104104
}
105-
process.stdout.write(result.data.run.output);
105+
if (result.data.run != null) {
106+
process.stdout.write(result.data.run.output);
107+
}
106108
}
107109

108110
if (result.data.compile != null && result.data.compile.exitCode !== 0) {
109111
process.exitCode = result.data.compile.exitCode ?? 1;
110-
} else {
112+
} else if (result.data.run != null) {
111113
process.exitCode = result.data.run.exitCode ?? 1;
114+
} else {
115+
process.exitCode = 1;
112116
}
113117
},
114118
);

0 commit comments

Comments
 (0)