Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
shrinkwrap: suggest installing the merge driver (#20071)
Browse files Browse the repository at this point in the history
PR-URL: #20071
Credit: @zkat
Reviewed-By: @iarna
  • Loading branch information
zkat authored and iarna committed Mar 23, 2018
1 parent 143cdbf commit 5ebe997
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/install/read-shrinkwrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ function parsePkgLock (str, filename) {
} catch (e) {
if (isDiff(str)) {
log.warn('conflict', `A git conflict was detected in ${filename}. Attempting to auto-resolve.`)
log.warn('conflict', 'To make this happen automatically on git rebase/merge, consider using the npm-merge-driver:')
log.warn('conflict', '$ npx npm-merge-driver install -g')
const pieces = str.split(/[\n\r]+/g).reduce((acc, line) => {
if (line.match(PARENT_RE)) acc.state = 'parent'
else if (line.match(OURS_RE)) acc.state = 'ours'
Expand Down

0 comments on commit 5ebe997

Please sign in to comment.