Skip to content

Commit

Permalink
version: fix sign-git-commit options (#58)
Browse files Browse the repository at this point in the history
Oops: 7984206 did the
wrong thing with the git params, and it breaks anyone
trying to sign their git commits with npm version.

Fixes: https://npm.community/t/1661
Credit: @zkat
  • Loading branch information
zkat committed Aug 29, 2018
1 parent fc1a8d1 commit 89652cb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/version.js
Expand Up @@ -296,7 +296,11 @@ function _commit (version, localData, cb) {
const message = npm.config.get('message').replace(/%s/g, version)
const signTag = npm.config.get('sign-git-tag')
const signCommit = npm.config.get('sign-git-commit')
const commitArgs = buildCommitArgs([ 'commit', signCommit ? '-S -m' : '-m', message ])
const commitArgs = buildCommitArgs([
'commit',
...(signCommit ? ['-S', '-m'] : ['-m']),
message
])
const flagForTag = signTag ? '-sm' : '-am'

stagePackageFiles(localData, options).then(() => {
Expand Down

0 comments on commit 89652cb

Please sign in to comment.