Skip to content

Commit f042044

Browse files
author
Arnavion
committed
Fixed "TypeError: invalid data" when executables run by exec exited with non-zero code.
The original error was because process.stderr only allows writing Strings or Buffers, but status is a Number. Also, the message parameter of the "error" handler is just the amalgam of all output written to stderr. This is already logged by the "stderr" handler, so there's no need to write it to process.stderr again.
1 parent 1eba8db commit f042044

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Jakefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,7 @@ function exec(cmd, completeHandler) {
447447
complete();
448448
});
449449
ex.addListener("error", function(e, status) {
450-
process.stderr.write(status);
451-
process.stderr.write(e);
450+
console.error("Process exited with code " + status);
452451
complete();
453452
})
454453
try{

0 commit comments

Comments
 (0)