From f042044fceb544b0fb14354d8b798dbd1e613ee3 Mon Sep 17 00:00:00 2001 From: Arnavion Date: Tue, 16 Dec 2014 02:45:17 -0800 Subject: [PATCH] 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. --- Jakefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Jakefile b/Jakefile index 2c919cd20b8..0425b0a0bf9 100644 --- a/Jakefile +++ b/Jakefile @@ -447,8 +447,7 @@ function exec(cmd, completeHandler) { complete(); }); ex.addListener("error", function(e, status) { - process.stderr.write(status); - process.stderr.write(e); + console.error("Process exited with code " + status); complete(); }) try{