Skip to content

Commit

Permalink
Update execSyncOpts to support string and array for stdio
Browse files Browse the repository at this point in the history
  • Loading branch information
skovhus authored and gabelevi committed Dec 2, 2016
1 parent b301a3d commit a3f54a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion 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 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 a3f54a2

Please sign in to comment.