Permalink
Browse files

fix(merge): get merging working right

  • Loading branch information...
zkat committed Dec 2, 2017
1 parent 656dae4 commit 28af1f2b1f0211f29eb2349cc6b7e92b0d2a4662
Showing with 5 additions and 3 deletions.
  1. +5 −3 index.js
8 index.js 100644 → 100755
@@ -34,8 +34,10 @@ function configureGit () {
}
function mergeFiles (current, old, theirs, file) {
const out = cp.execSync(`git merge-file -p ${current} ${old} ${theirs}`)
fs.writeFileSync(file, out)
cp.execSync('npm install --package-lock-only')
const ret = cp.spawnSync('git', [
'merge-file', '-p', current, old, theirs
], {stdio: [0, 'pipe', 2]})
fs.writeFileSync(file, ret.stdout)
cp.spawnSync('npm', ['install', '--package-lock-only'], {stdio: 'inherit'})
fs.writeFileSync(current, fs.readFileSync(file))
}

0 comments on commit 28af1f2

Please sign in to comment.