Skip to content

Commit

Permalink
test: fix git configs for git 2.23 and above
Browse files Browse the repository at this point in the history
Config values are now case-sensitive, so `commit.gpgsign=false` was
doing nothing.

PR-URL: #456
Credit: @isaacs
Close: #456
Reviewed-by: @claudiahdz
  • Loading branch information
isaacs authored and claudiahdz committed Nov 13, 2019
1 parent 0091c74 commit fe3df79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/install/inflate-shrinkwrap.js
Expand Up @@ -84,6 +84,7 @@ function tarballToVersion (name, tb) {
} else {
matchRegTarball = new RegExp(`^${registry}(.*)?/-/\\1-(.*)[.]tgz$`)
}
if (!tb) return
const match = tb.match(matchRegTarball)
if (!match) return
return match[2] || match[1]
Expand Down
3 changes: 2 additions & 1 deletion test/common-tap.js
Expand Up @@ -193,7 +193,8 @@ exports.makeGitRepo = function (params, cb) {
git.chainableExec(['config', 'user.name', user], opts),
git.chainableExec(['config', 'user.email', email], opts),
// don't time out tests waiting for a gpg passphrase or 2fa
git.chainableExec(['config', 'commit.gpgsign', 'false'], opts),
git.chainableExec(['config', 'commit.gpgSign', 'false'], opts),
git.chainableExec(['config', 'tag.gpgSign', 'false'], opts),
git.chainableExec(['config', 'tag.forceSignAnnotated', 'false'], opts),
git.chainableExec(['add'].concat(added), opts),
git.chainableExec(['commit', '-m', message], opts)
Expand Down

0 comments on commit fe3df79

Please sign in to comment.