From 06f0c6ca0443ef77265b55479a078a0ee9d0b138 Mon Sep 17 00:00:00 2001 From: Gabe Levi Date: Fri, 2 Dec 2016 14:16:39 -0800 Subject: [PATCH] Fix childprocess Summary: This fixes https://github.com/facebook/flow/issues/2824 I would wait merging it before https://github.com/nodejs/node/pull/9637 has been approved. Closes https://github.com/facebook/flow/pull/2825 Differential Revision: D4268009 Pulled By: gabelevi fbshipit-source-id: 1493ee7393516792fc08581cf0c71bc719c85f57 --- lib/node.js | 6 +++--- tests/node_tests/child_process/execSync.js | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/node.js b/lib/node.js index 29e2fcba4f8..70d848934b9 100644 --- a/lib/node.js +++ b/lib/node.js @@ -142,7 +142,7 @@ type child_process$execCallback = (error: ?child_process$Error, stdout: string | type child_process$execSyncOpts = { cwd?: string; input?: string | Buffer; - stdio?: Array; + stdio?: string | Array; env?: Object; shell?: string, uid?: number; @@ -169,7 +169,7 @@ type child_process$execFileCallback = (error: ?child_process$Error, stdout: Buff type child_process$execFileSyncOpts = { cwd?: string; input?: string | Buffer; - stdio?: Array; + stdio?: string | Array; env?: Object; uid?: number; gid?: number; @@ -216,7 +216,7 @@ type child_process$spawnRet = { type child_process$spawnSyncOpts = { cwd?: string; input?: string | Buffer; - stdio?: Array; + stdio?: string | Array; env?: Object; uid?: number; gid?: number; diff --git a/tests/node_tests/child_process/execSync.js b/tests/node_tests/child_process/execSync.js index 6fef2c035aa..171fd174883 100644 --- a/tests/node_tests/child_process/execSync.js +++ b/tests/node_tests/child_process/execSync.js @@ -6,3 +6,5 @@ var execSync = require('child_process').execSync; (execSync('ls', {encoding: 'buffer'}): Buffer); // returns Buffer (execSync('ls', {encoding: 'utf8'}): string); // returns string (execSync('ls', {timeout: '250'})); // error, no signatures match +(execSync('ls', {stdio: 'inherit'})); // error, no signatures match +(execSync('ls', {stdio: ['inherit']})); // error, no signatures match