diff --git a/lib/Local.js b/lib/Local.js index 9c0ed97..32391e3 100644 --- a/lib/Local.js +++ b/lib/Local.js @@ -54,12 +54,14 @@ function Local(){ } var data = {}; - if(stdout) + if(!!stdout) data = JSON.parse(stdout); else if(stderr) data = JSON.parse(stderr); - else + else { callback(new LocalError('No output received')); + return; + } if(data['state'] != 'connected'){ callback(new LocalError(data['message']['message']));