Change server-side shell running implementation
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { shell } from "$sb/syscalls.ts";
|
||||
import { SysCallMapping } from "../../plugos/system.ts";
|
||||
import { ShellResponse } from "../../server/rpc.ts";
|
||||
import { ShellBackend } from "../shell_backend.ts";
|
||||
|
||||
export function shellSyscalls(shellBackend: ShellBackend): SysCallMapping {
|
||||
return {
|
||||
"shell.run": (
|
||||
_ctx,
|
||||
cmd: string,
|
||||
args: string[],
|
||||
): Promise<ShellResponse> => {
|
||||
return shellBackend.handle({ cmd, args });
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user