chef / knife-windows

Plugin for Chef's knife tool for working with Windows nodes
Apache License 2.0
152 stars 110 forks source link

WinRm bootstrap destroys PATH, preventing chef client from finding installed command line utilities #482

Closed rlaveycal closed 5 years ago

rlaveycal commented 5 years ago

Version:

1.9.6

Scenario:

https://github.com/chef/knife-windows/commit/f2098955a72acaaf87fdeab51f0e2da8454b383d#diff-5248e81ebe7911aafaafe4e3073832a2 changed the way that the PATH is set prior to the chef run. Instead of appending chef's directory it is now totally re-written. This breaks recipes that call commands installed in non-system directories that have been added to the path.

The logic should be reverted and made smarter:

  1. Check existing length - append if there's space
  2. Else parse the path and drop end elements until there's space for Chef
tas50 commented 5 years ago

Hey there. In Chef Infra Client 15 we completely rewrote the bootstrap functionality of Chef to use train engine. That rewrite fixed a large number of long standing issues and moves us to a much more robust connection method for bootstrapping. There is high likelihood that this issue has been resolved with that rewrite. I'm going to close this out at this point, but if you encounter the problem with Chef Infra Client 15 please open it up again.