diff options
author | Kat Marchán <kzm@zkat.tech> | 2018-08-29 21:42:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-29 21:42:37 +0300 |
commit | 89652cb9b810f929f5586fc90cc6794d076603fb (patch) | |
tree | c686d3eb293dc6218c5dc1d278ecda318cb63661 /lib | |
parent | fc1a8d185fc678cdf3784d9df9eef9094e0b2dec (diff) |
version: fix sign-git-commit options (#58)
Oops: 7984206e2f41b8d8361229cde88d68f0c96ed0b8 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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/version.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/version.js b/lib/version.js index 4439f679b..265b049bf 100644 --- a/lib/version.js +++ b/lib/version.js @@ -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(() => { |