Snapshot
This commit is contained in:
parent
0964775517
commit
7bd58ae0e8
@ -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<ShellResponse> => {
|
||||
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 };
|
||||
},
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user