Skip to content

Commit

Permalink
Fix childprocess
Browse files Browse the repository at this point in the history
Summary:
This fixes #2824

I would wait merging it before nodejs/node#9637 has been approved.
Closes #2825

Differential Revision: D4268009

Pulled By: gabelevi

fbshipit-source-id: 1493ee7393516792fc08581cf0c71bc719c85f57
  • Loading branch information
gabelevi authored and Facebook Github Bot committed Dec 2, 2016
1 parent a2db808 commit 06f0c6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<any>;
stdio?: string | Array<any>;
env?: Object;
shell?: string,
uid?: number;
Expand All @@ -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<any>;
stdio?: string | Array<any>;
env?: Object;
uid?: number;
gid?: number;
Expand Down Expand Up @@ -216,7 +216,7 @@ type child_process$spawnRet = {
type child_process$spawnSyncOpts = {
cwd?: string;
input?: string | Buffer;
stdio?: Array<any>;
stdio?: string | Array<any>;
env?: Object;
uid?: number;
gid?: number;
Expand Down
2 changes: 2 additions & 0 deletions tests/node_tests/child_process/execSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 06f0c6c

Please sign in to comment.