diff --git a/plugos/syscalls/shell.deno.ts b/plugos/syscalls/shell.deno.ts index a83596b..e2fc468 100644 --- a/plugos/syscalls/shell.deno.ts +++ b/plugos/syscalls/shell.deno.ts @@ -1,3 +1,4 @@ +import { ShellResponse } from "../../server/rpc.ts"; import type { SysCallMapping } from "../system.ts"; export function shellSyscalls(cwd: string): SysCallMapping { @@ -6,7 +7,7 @@ export function shellSyscalls(cwd: string): SysCallMapping { _ctx, cmd: string, args: string[], - ): Promise<{ stdout: string; stderr: string }> => { + ): Promise => { const p = new Deno.Command(cmd, { args: args, cwd, @@ -17,7 +18,7 @@ export function shellSyscalls(cwd: string): SysCallMapping { const stdout = new TextDecoder().decode(output.stdout); const stderr = new TextDecoder().decode(output.stderr); - return { stdout, stderr }; + return { stdout, stderr, code: output.code }; }, }; }