From a200043285e40be61ed3a1defa2dab0ee1dcfa0e Mon Sep 17 00:00:00 2001 From: Justin SB Date: Tue, 30 Sep 2014 12:42:17 -0700 Subject: [PATCH] Log if phantomjs exits with error (e.g. missing libs) --- tools/selftest.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/selftest.js b/tools/selftest.js index 3b87098a5d..129544a44f 100644 --- a/tools/selftest.js +++ b/tools/selftest.js @@ -837,7 +837,12 @@ _.extend(PhantomClient.prototype, { '/bin/bash', ['-c', ("exec " + phantomPath + " --load-images=no /dev/stdin <<'END'\n" + - phantomScript + "\nEND\n")]); + phantomScript + "\nEND\n")], + {}, function (exitCode, stdout, stderr) { + if (exitCode != 0) { + console.log("PhantomJS exited with exitCode ", exitCode, "\nstdout:\n", stdout, "\nstderr:\n", stderr); + } + }); }, stop: function() {