get error message in 'ps ax' failure case

We still want JSON.stringify too because that includes stuff like the
exit code.

See #2158
This commit is contained in:
David Glasser
2014-05-22 15:43:26 -07:00
parent 98d81904f1
commit 21bc8be7df

View File

@@ -52,7 +52,8 @@ var findMongoPids = function (appDir, port) {
'ps ax',
function (error, stdout, stderr) {
if (error) {
fut['throw'](new Error("Couldn't run ps ax: " + JSON.stringify(error)));
fut['throw'](new Error("Couldn't run ps ax: " + JSON.stringify(error) +
"; " + error.message));
return;
}