Skip to content

Commit

Permalink
Fixed standard output from child process (#472)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie committed Jun 12, 2024
2 parents 572ebea + ccea269 commit e57fd71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Read more:
using it!
- Fixes bug where CLI defaults override `graphile.config.js` settings (by
removing CLI defaults)
- Fix bug where executable tasks had their stdout/stderr ignored; this is now
output via logging (thanks @wineTGH).

## v0.16.6

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/LoadTaskFromExecutableFilePlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ function makeTaskForExecutable(taskIdentifier: string, fullPath: string): Task {
child.once("error", (error) => {
reject(error);
});
child.on("stdout", (data) => {
child.stdout.on("data", (data) => {
helpers.logger.info(data.toString("utf8"));
});
child.on("stderr", (data) => {
child.stderr.on("data", (data) => {
helpers.logger.error(data.toString("utf8"));
});
child.once("close", (code) => {
Expand Down

0 comments on commit e57fd71

Please sign in to comment.