Browse files

bin: use results object passed from module API

  • Loading branch information...
1 parent 8cbaa49 commit 009c8a3d9c47e63e023c4e91abe2ddf878976906 @macbre committed Jan 22, 2014
Showing with 2 additions and 4 deletions.
  1. +2 −4 bin/phantomas.js
View
6 bin/phantomas.js
@@ -89,10 +89,9 @@ options['no-externals'] = options.externals === false;
delete options.externals;
// spawn phantomas process
-child = phantomas(url, options, function(err, res) {
+child = phantomas(url, options, function(err, data, results) {
var debug = require('debug')('phantomas:bin'),
doneFn,
- results,
reporter;
doneFn = function() {
@@ -101,9 +100,8 @@ child = phantomas(url, options, function(err, res) {
process.exit(err);
}
- if (res !== false) {
+ if (results !== false) {
// process JSON results by reporters
- results = new (require('../core/results'))(res);
reporter = require('../core/reporter')(results, options);
debug('Calling a reporter...');

0 comments on commit 009c8a3

Please sign in to comment.