Skip to content

Commit

Permalink
Fix conflicter by giving a buffer to detect-conflict
Browse files Browse the repository at this point in the history
detect-conflict dependency handles buffers properly, so this toString() call is not required anymore and cause false positive on conflicter.

Close #717
  • Loading branch information
Toilal committed Jan 16, 2015
1 parent 0f1bfa9 commit 94b4cf2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ Base.prototype._writeFiles = function (done) {
return cb();
}

self.conflicter.checkForCollision(file.path, file.contents.toString(), function (err, status) {
self.conflicter.checkForCollision(file.path, file.contents, function (err, status) {
if (err) return cb(err);
if (status !== 'skip') {
stream.push(file);
Expand Down
2 changes: 1 addition & 1 deletion lib/util/conflicter.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Conflicter.prototype._ask = function (file, cb) {
}

if (result.action === 'diff') {
this.adapter.diff(fs.readFileSync(file.path, 'utf8'), file.contents);
this.adapter.diff(fs.readFileSync(file.path, 'utf8'), file.contents.toString());
return this._ask(file, cb);
}

Expand Down

0 comments on commit 94b4cf2

Please sign in to comment.