diff options
author | Lamont Granquist <lamont@chef.io> | 2020-07-23 22:16:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-23 22:16:07 -0700 |
commit | 8565376c6fca544ea81392239ac15cc8fe6c69b6 (patch) | |
tree | eeff9347e4c24faa00135680cac703baa1e7107f | |
parent | ca77e0deb566570f2bd4e24bb4fe037a21123480 (diff) | |
parent | 920c1f60e0e441bf3830048693333e796c863879 (diff) | |
download | chef-8565376c6fca544ea81392239ac15cc8fe6c69b6.tar.gz |
Merge pull request #10202 from chef/lcg/fix-default-paths
Fix default_paths patch
-rw-r--r-- | lib/chef/mixin/default_paths.rb | 10 | ||||
-rw-r--r-- | lib/chef/mixin/which.rb | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/mixin/default_paths.rb b/lib/chef/mixin/default_paths.rb index 836911270a..95f444c13f 100644 --- a/lib/chef/mixin/default_paths.rb +++ b/lib/chef/mixin/default_paths.rb @@ -15,16 +15,16 @@ # limitations under the License. # +require "chef-utils/dsl/default_paths" unless defined?(ChefUtils::DSL::DefaultPaths) + class Chef module Mixin module DefaultPaths - def enforce_path_sanity(env = ENV) - enforce_default_paths(env) - end + include ChefUtils::DSL::DefaultPaths def enforce_default_paths(env = ENV) - if Chef::Config[:enforce_default_paths] - env["PATH"] = ChefUtils::DSL::DefaultPaths.default_paths(env) + if Chef::Config[:enforce_default_paths] || Chef::Config[:enforce_path_sanity] + env["PATH"] = default_paths(env) end end end diff --git a/lib/chef/mixin/which.rb b/lib/chef/mixin/which.rb index a5975f958a..1e58c8bc3a 100644 --- a/lib/chef/mixin/which.rb +++ b/lib/chef/mixin/which.rb @@ -28,7 +28,7 @@ class Chef private - # we dep-inject path sanity into this API for historical reasons + # we dep-inject default paths into this API for historical reasons # # @api private def __extra_paths |