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

Commit

Permalink
version: Let version succeed when package-lock.json is gitignored
Browse files Browse the repository at this point in the history
Credit: @nwoltman
PR-URL: #20154
Reviewed-By: @iarna
Fixes: #17168
  • Loading branch information
nwoltman authored and iarna committed Apr 11, 2018
1 parent e8f4fac commit f18be9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@ function _commit (version, localData, cb) {
function stagePackageFiles (localData, options) {
return addLocalFile('package.json', options, false).then(() => {
if (localData.hasShrinkwrap) {
return addLocalFile('npm-shrinkwrap.json', options, false)
return addLocalFile('npm-shrinkwrap.json', options, true)
} else if (localData.hasPackageLock) {
return addLocalFile('package-lock.json', options, false)
return addLocalFile('package-lock.json', options, true)
}
})
}
Expand Down

0 comments on commit f18be9b

Please sign in to comment.