Skip to content

Commit

Permalink
Don't output stderr from internal child process call to the terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Oct 7, 2021
1 parent d3c8a56 commit 0cd6cce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@ export async function exec(command, arguments_) {
@returns {string}
*/
export function execSync(command, arguments_) {
return childProcess.execFileSync(command, arguments_, {encoding: 'utf8'}).trim();
return childProcess.execFileSync(command, arguments_, {
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'ignore'],
}).trim();
}

0 comments on commit 0cd6cce

Please sign in to comment.