diff options
Diffstat (limited to 'lib/diff.js')
-rw-r--r-- | lib/diff.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/diff.js b/lib/diff.js index c6c31cacb..3123929a4 100644 --- a/lib/diff.js +++ b/lib/diff.js @@ -190,7 +190,7 @@ function buildDiffHandler(config) { stdout += "\n[Truncated]"; truncated = true; child.kill(); - return; + resolve(stdout); } stdout += data; }); @@ -198,7 +198,7 @@ function buildDiffHandler(config) { child.on('error', function (e) { reject(e); }); - child.on('exit', function (code) { + child.on('exit', function () { resolve(stdout); }); }); @@ -219,7 +219,10 @@ function buildDiffHandler(config) { } }) .catch(function (err) { - res.error(err); + res.end(JSON.stringify({ + computedDiff: "Failed to diff: " + err, + zones: null + })); }); }; } |