Skip to content

Commit af32e23

Browse files
ttwthomasstephenlacy
ttwthomas
authored andcommitted
don't return error when nothing to commit. (#148)
* don't return error when nothing to commit. same as #118 * Reduces length and removes the need for two checks
1 parent 9edb195 commit af32e23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/commit.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ module.exports = function(message, opt) {
8383
}
8484

8585
var execChildProcess = exec(cmd, opt, function(err, stdout, stderr) {
86-
if (err) return cb(err);
86+
if (err && (String(stdout).indexOf('no changes added to commit') === 0)) return cb(err);
8787
if (!opt.quiet) gutil.log(stdout, stderr);
8888
files.forEach(self.push.bind(self));
8989
self.emit('end');

0 commit comments

Comments
 (0)