Skip to content

Commit

Permalink
fix: do not use execa.stdout.pipe as it closes the stream
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg committed Aug 4, 2018
1 parent 2ba5271 commit 7fae209
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/exec-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ module.exports = async ({cmd, ...config}, {cwd, env, stdout, stderr, logger, ...

logger.log('Call script %s', script);

const shell = execa.shell(script, {cwd, env});
shell.stdout.pipe(stdout);
shell.stderr.pipe(stderr);
const {stdout: cmdStdout, stderr: cmdStderr} = await execa.shell(script, {cwd, env});
stdout.write(cmdStdout);
stderr.write(cmdStderr);

return (await shell).stdout.trim();
return cmdStdout.trim();
};

0 comments on commit 7fae209

Please sign in to comment.