puppetlabs / bolt-vanagon

Apache License 2.0
2 stars 31 forks source link

(GH-2922) Save unset environment variables #170

Closed lucywyman closed 3 years ago

lucywyman commented 3 years ago

The bolt_env_wrapper script unsets several environment variables to make Bolt execution predictable. Unsetting these variables also means they are unset when Bolt runs Ruby tasks and scripts over the local transport, which is incidental to Bolt being written in Ruby. The env wrapper now saves Ruby-related environment variables to new BOLT_ORIG_<env_var> variables, which allows Bolt to restore the original values when running over the local transport with bundled-ruby set to false.