Skip to content

Commit d08ffb3

Browse files
committed
chore(npm): fix exec api
1 parent f51613c commit d08ffb3

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

tasks/helpers/reporter.js

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,15 @@ module.exports = function ccm() {
1010

1111
var ccReporter = path.join(__dirname, 'node_modules', '.bin', 'codeclimate-test-reporter');
1212
return through2.obj(function handleFile(file, encoding, next) {
13-
exec(util.format('CODECLIMATE_REPO_TOKEN=%s %s < "%s"', process.env.CODE_CLIMATE_TOKEN, ccReporter, file.path))
14-
.then(function execCompleted(stdout, stderr) {
15-
if (stderr) {
16-
next(new gutil.PluginError({
17-
message: stderr
18-
}));
19-
return;
20-
}
21-
gutil.log('Coverage file posted: "%s"', file.path);
22-
next();
23-
})
24-
.catch(next);
13+
exec(util.format('CODECLIMATE_REPO_TOKEN=%s %s < "%s"', process.env.CODE_CLIMATE_TOKEN, ccReporter, file.path), function(err) {
14+
if (err) {
15+
next(new gutil.PluginError({
16+
message: err
17+
}));
18+
return;
19+
}
20+
gutil.log('Coverage file posted: "%s"', file.path);
21+
next();
22+
});
2523
});
2624
};

0 commit comments

Comments
 (0)