--dir skips glob-matched files but still bumps the config
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
Research direction
Start from the --dir handling and glob file matching, then trace how the working directory is passed to glob resolution. Reproduce the issue by running bumpversion --dir proj patch from the parent directory with the shown config and compare it with a run from inside proj. Done means pkgs/a/VERSION and current_version both become 1.0.1 when invoked from the parent.
Written by the indexing model from the issue text.
Description
With --dir, files matched by a glob are skipped without a warning, while the config's current_version is still bumped:
$ # proj/.bumpversion.toml: current_version = "1.0.0", files = [{ glob = "pkgs/*/VERSION" }]
$ # proj/pkgs/a/VERSION contains 1.0.0
$ bumpversion --dir proj patch # run from proj's parent
$ echo $?
0
$ cat proj/pkgs/a/VERSION
1.0.0
$ grep current proj/.bumpversion.toml
current_version = "1.0.1"
Run from inside proj, the same config bumps pkgs/a/VERSION. So the glob seems to resolve against the current directory rather than the --dir directory. The result is a config and files that disagree, with exit status 0.
Expected: resolve globs against the repository directory --dir names. A glob that matches nothing could also deserve a warning.
- Dominant language
- Rust
- Stars
- 1
- Forks
- 0
- Avg merge
- 12m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from romnn/bumpversion
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
romnn/bumpversion#11 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
romnn/bumpversion#10 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
romnn/bumpversion#8 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
romnn/bumpversion#7 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
romnn/bumpversion#5 ·
All issues in romnn/bumpversion
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ardia-browser/ardia#5810 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
UIUX の修正Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
aptos-labs/aptos-core#21119 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 8 days