Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKat Marchán <kzm@zkat.tech>2018-08-29 21:42:37 +0300
committerGitHub <noreply@github.com>2018-08-29 21:42:37 +0300
commit89652cb9b810f929f5586fc90cc6794d076603fb (patch)
treec686d3eb293dc6218c5dc1d278ecda318cb63661 /lib
parentfc1a8d185fc678cdf3784d9df9eef9094e0b2dec (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.js6
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(() => {