[node] child_process stdio actually allows "inherit" (#28075)

This commit is contained in:
James Bromwell
2018-08-22 19:12:10 +02:00
committed by Andy
parent c05daad057
commit 1cfd23c618
2 changed files with 2 additions and 2 deletions

View File

@@ -2198,7 +2198,7 @@ declare module "child_process" {
keepOpen?: boolean;
}
export type StdioOptions = "pipe" | "ignore" | "inherit" | Array<("pipe" | "ipc" | "ignore" | stream.Stream | number | null | undefined)>;
export type StdioOptions = "pipe" | "ignore" | "inherit" | Array<("pipe" | "ipc" | "ignore" | "inherit" | stream.Stream | number | null | undefined)>;
export interface SpawnOptions {
cwd?: string;

View File

@@ -2329,7 +2329,7 @@ namespace child_process_tests {
childProcess.exec("echo test", { windowsHide: true });
childProcess.spawn("echo", ["test"], { windowsHide: true });
childProcess.spawn("echo", ["test"], { windowsHide: true, argv0: "echo-test" });
childProcess.spawn("echo", ["test"], { stdio: [0xdeadbeef, undefined, "pipe"] });
childProcess.spawn("echo", ["test"], { stdio: [0xdeadbeef, "inherit", undefined, "pipe"] });
childProcess.spawnSync("echo test");
childProcess.spawnSync("echo test", {windowsVerbatimArguments: false});
childProcess.spawnSync("echo test", {windowsVerbatimArguments: false, argv0: "echo-test"});