We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a01b91b commit 356bc82Copy full SHA for 356bc82
plug-api/syscalls/shell.ts
@@ -4,11 +4,14 @@ import { syscall } from "../syscall.ts";
4
* Runs a shell command.
5
* @param cmd the command to run
6
* @param args the arguments to pass to the command
7
+ * @param stdin optional string to pass as stdin to the command
8
* @returns the stdout, stderr, and exit code of the command
9
*/
10
export function run(
11
cmd: string,
12
args: string[],
13
+ stdin?: string,
14
): Promise<{ stdout: string; stderr: string; code: number }> {
- return syscall("shell.run", cmd, args);
15
+ return syscall("shell.run", cmd, args, stdin);
16
}
17
+
0 commit comments