Chef and $PATH manipulation


So a bug that ended up being somewhat unrelated brought up a question today: is it still a good idea to be adding the Ruby bindir and gemdir in out path sanity handling? How many places is it actually a good idea for a run-of-the-mill shell_out to call something in either of those folders? The two we could think of were using tar.exe for cookbook downloads on Windows (which needs to be ripped out because it keeps breaking) and possibly running the erubis CLI tool for template syntax checks. Are there are other places where this is happening? And more importantly, could we put those behind some kind of chef_internal flag on shell_out?


For reference, that behavior was added in around the time of 0.10.10. That commit references which is specifically about the erubis thing. If that is the only place we need this, we can probably use a more fine-grained solution :slight_smile: