Skip to content

Commit

Permalink
Fix cli overwriting files even if in print mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dasilvacontin committed Aug 31, 2015
1 parent 2993fb7 commit af0227a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ _.forEach(files, function (file) {
fs.readFileAsync(file).then(function (data) {
var dressed = sauce.dress(data.toString(), config)
if (print) console.log(dressed)
return fs.writeFileAsync(file, dressed)
else return fs.writeFileAsync(file, dressed)
}).then(function () {
doneDressing('- [x] "' + file + '" was dressed with gh-sauce')
}).catch(function (err) {
Expand Down

0 comments on commit af0227a

Please sign in to comment.