summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2020-07-24 10:06:30 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2020-07-24 10:06:30 -0700
commit986d9cca6e9060eb4592599bbebd394cf06bfbea (patch)
tree70c17a1db40c9e2e39a02c19d534fd0cdbcd8ebf
parentdbe6ae2d2ea198e359dbdf5b5c1c0b449a4d1004 (diff)
downloadchef-986d9cca6e9060eb4592599bbebd394cf06bfbea.tar.gz
Revert "Fix default_paths patch"
This reverts commit 920c1f60e0e441bf3830048693333e796c863879.
-rw-r--r--lib/chef/mixin/default_paths.rb10
-rw-r--r--lib/chef/mixin/which.rb2
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/mixin/default_paths.rb b/lib/chef/mixin/default_paths.rb
index 95f444c13f..836911270a 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
- include ChefUtils::DSL::DefaultPaths
+ def enforce_path_sanity(env = ENV)
+ enforce_default_paths(env)
+ end
def enforce_default_paths(env = ENV)
- if Chef::Config[:enforce_default_paths] || Chef::Config[:enforce_path_sanity]
- env["PATH"] = default_paths(env)
+ if Chef::Config[:enforce_default_paths]
+ env["PATH"] = ChefUtils::DSL::DefaultPaths.default_paths(env)
end
end
end
diff --git a/lib/chef/mixin/which.rb b/lib/chef/mixin/which.rb
index 1e58c8bc3a..a5975f958a 100644
--- a/lib/chef/mixin/which.rb
+++ b/lib/chef/mixin/which.rb
@@ -28,7 +28,7 @@ class Chef
private
- # we dep-inject default paths into this API for historical reasons
+ # we dep-inject path sanity into this API for historical reasons
#
# @api private
def __extra_paths