git icon indicating copy to clipboard operation
git copied to clipboard

Windows PATH bug

Open jblaine opened this issue 2 years ago • 0 comments

:ghost: 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.

:pancakes: Cookbook version

11.1 but expect that this exists in far earlier versions.

:woman_cook: Chef-Infra Version

N/A

:tophat: Platform details

N/A

Steps To Reproduce

N/A

:police_car: Expected behavior

N/A

:heavy_plus_sign: Additional context

N/A

jblaine avatar Oct 13 '22 23:10 jblaine