From bc8bb352a871e08abbd61dfc69a882930329151c Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Sat, 7 Dec 2013 17:03:07 -0500 Subject: [PATCH] added stdout check to exec --- app.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index 06be47c483..8013a9e320 100644 --- a/app.js +++ b/app.js @@ -49,10 +49,9 @@ }; require('child_process').exec('/usr/bin/which convert', function(err, stdout, stderr) { - if(err) { - winston.warn('Counldn\'t find convert. Did you install imagemagick? ', err.message); + if(err || !stdout) { + winston.warn('Counldn\'t find convert. Did you install imagemagick?'); } - winston.warn('Counldn\'t find convert. Did you install imagemagick? ', err); }); // Log GNU copyright info along with server info