HomePhorge

(#9636) Fix PATHEXT resolution for paths other than system32
448d5dbb675cUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#9636) Fix PATHEXT resolution for paths other than system32

Previously, Puppet::Util.which could only resolve executables that
were located in the first PATH directory entry, typically
c:\windows\system32.

This was introduced in 0258096c4 due to the inner loop overwriting the
'bin' variable that was used in the outer loop. And it wasn't noticed
during testing, because I was always using executables from
c:\windows\system32, e.g. cmd.exe.

This commit changes that the inner loop to use a different variable so
as to not clobber the 'bin' variable. It also updates the spec test.

Details

Provenance
Josh Cooper <josh@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU5e3962c5b149: Merge remote-tracking branch 'stschulte/ticket/2.7.x/9796' into 2.7.x
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Cooper <josh@puppetlabs.com> committed rPU448d5dbb675c: (#9636) Fix PATHEXT resolution for paths other than system32 (authored by Josh Cooper <josh@puppetlabs.com>).Oct 13 2011, 12:09 AM