noVerify is not settable to true via a config file with an empty command line
Describe the bug
I suspect that this is because the override parameter that is passed in to loadBumpConfig has noVerify set to false instead of undefined at that point.
I suspect that confirm cannot be set to false in a config file and install cannot be set to true in the same way, but I have not tested those. (install is set to false, confirm is set to true, other options are set to undefined.)
If I can figure out how to create a failing test, I'll do it.
// output from putting `console.log(overrides); console.log(config);` in just before loadBumpConfig returns with the bump.config.ts below...
{
preid: undefined,
commit: undefined,
tag: undefined,
sign: undefined,
push: undefined,
all: undefined,
noGitCheck: undefined,
confirm: true,
noVerify: false,
install: false,
files: [],
ignoreScripts: undefined,
currentVersion: undefined,
execute: undefined,
printCommits: undefined,
recursive: undefined
}
{
commit: 'chore: bump version to v',
...
noVerify: false,
}
// bump.config.ts
import { defineConfig } from 'bumpp'
export default defineConfig({
commit: 'chore: bump version to v',
noVerify: true,
})
Reproduction
Check out and follow the directions in https://git.sr.ht/~csjewell/bumpp-issue-80
System Info
System:
OS: Linux 6.8 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
CPU: (8) x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
Memory: 15.66 GB / 31.23 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 23.6.1 - ~/.nvm/versions/node/v23.6.1/bin/node
npm: 11.2.0 - ~/.nvm/versions/node/v23.6.1/bin/npm
pnpm: 10.8.1 - ~/.local/share/pnpm/pnpm
bun: 1.2.4 - ~/.bun/bin/bun
Browsers:
Brave Browser: 135.1.77.100
Chrome: 135.0.7049.95
Used Package Manager
pnpm
Validations
- [x] Follow our Code of Conduct
- [x] Read the Contributing Guide.
- [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [x] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- [x] The provided reproduction is a minimal reproducible of the bug.
Contributions
- [x] I am willing to submit a PR to fix this issue
- [ ] I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)
Here's a git repository that reproduces the issue: https://git.sr.ht/~csjewell/bumpp-issue-80
(And yes, the pre-commit hook is bypassable with --no-verify. I found this bug because I had an interactive prepare-commit-msg hook, which unfortunately, is NOT bypassable in that way, and caused bumpp to appear to hang, also. I did notice how to fix THAT problem: put if test "x$2" = "xmessage"; then exit 0; fi as the first line of the prepare-commit-msg hook.)