Windows PATH bug
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 125
- Forks
- 170
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
👻 Brief Description
I was using this cookbook as a reference for one I am writing and while just reading the source code I believe I happened across a latent bug in the handling of adding the git installation path to the Windows PATH
I am 99.99% sure that at https://github.com/sous-chefs/git/blob/main/resources/client_windows.rb#L38 the code should be:
not_if { ENV['PATH'] =~ /#{GIT_PATH}/ }
and NOT
not_if { ENV['PATH'] =~ /GIT_PATH/ }
as you don't want to be looking for the string literal "GIT_PATH" but the value of that variable, interpolated.
🥞 Cookbook version
11.1 but expect that this exists in far earlier versions.
👩🍳 Chef-Infra Version
N/A
🎩 Platform details
N/A
Steps To Reproduce
N/A
🚓 Expected behavior
N/A
➕ Additional context
N/A
Contributor guide
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.
Research direction
Start at resources/client_windows.rb line 38 and inspect the not_if guard for the Windows PATH update, comparing it with the issue's two alternatives. The work is done when the guard checks the git installation path value rather than the literal GIT_PATH text; the issue does not name a reproduction or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100