Skip to content

Commit

Permalink
fix(typo): use whole message when appending to file
Browse files Browse the repository at this point in the history
  • Loading branch information
Brett Uglow committed May 17, 2016
1 parent 9d38114 commit 5d688a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,9 @@ if (process.argv.join('').indexOf('jasmine-node') === -1) {

fs.readFile(commitMsgFile, function(err, buffer) {
let lines = getLinesFromBuffer(buffer);
let msg = lines.join('\n');

if (!validateMessage(lines[0], lines.join('\n'))) {
if (!validateMessage(lines[0], msg)) {
fs.appendFile(incorrectLogFile, msg + '\n', function() {
process.exit(1);
});
Expand Down

0 comments on commit 5d688a8

Please sign in to comment.