From 7bd58ae0e8c52a6f8546923273bde77470b0b7c7 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Sun, 17 Dec 2023 15:13:00 +0100 Subject: [PATCH] Snapshot --- plugos/syscalls/shell.deno.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 }; }, }; }