Skip to content

Commit 89652cb

Browse files
authoredAug 29, 2018
version: fix sign-git-commit options (#58)
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
1 parent fc1a8d1 commit 89652cb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎lib/version.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,11 @@ function _commit (version, localData, cb) {
296296
const message = npm.config.get('message').replace(/%s/g, version)
297297
const signTag = npm.config.get('sign-git-tag')
298298
const signCommit = npm.config.get('sign-git-commit')
299-
const commitArgs = buildCommitArgs([ 'commit', signCommit ? '-S -m' : '-m', message ])
299+
const commitArgs = buildCommitArgs([
300+
'commit',
301+
...(signCommit ? ['-S', '-m'] : ['-m']),
302+
message
303+
])
300304
const flagForTag = signTag ? '-sm' : '-am'
301305

302306
stagePackageFiles(localData, options).then(() => {

0 commit comments

Comments
 (0)
Please sign in to comment.