summaryrefslogtreecommitdiff
path: root/lib/chef/client.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2019-09-05 14:20:52 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2019-09-05 14:20:52 -0700
commit37a72ed07c6d7ecfbecc71203cc3ac7e3fb69352 (patch)
tree22443116594a05fdd8cd222a607e5c5d0bf1f88c /lib/chef/client.rb
parenta49e9c58e399c1514cdcabfdf0f50451935d0df4 (diff)
downloadchef-lcg/chef-sugar.tar.gz
checkpointlcg/chef-sugar
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/client.rb')
-rw-r--r--lib/chef/client.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb
index 33d625c54e..5fd3a11562 100644
--- a/lib/chef/client.rb
+++ b/lib/chef/client.rb
@@ -20,7 +20,6 @@
require "chef/config"
require "chef/mixin/params_validate"
-require "chef/mixin/path_sanity"
require "chef/log"
require "chef/deprecated"
require "chef/server_api"
@@ -53,6 +52,7 @@ require "chef/policy_builder"
require "chef/request_id"
require "chef/platform/rebooter"
require "chef/mixin/deprecation"
+require "chef-helpers"
require "ohai"
require "rbconfig"
@@ -61,8 +61,6 @@ class Chef
# The main object in a Chef run. Preps a Chef::Node and Chef::RunContext,
# syncs cookbooks if necessary, and triggers convergence.
class Client
- include Chef::Mixin::PathSanity
-
extend Chef::Mixin::Deprecation
#
@@ -256,7 +254,7 @@ class Chef
logger.info("Platform: #{RUBY_PLATFORM}")
logger.info "Chef-client pid: #{Process.pid}"
logger.debug("Chef-client request_id: #{request_id}")
- enforce_path_sanity
+ ENV['PATH'] = ChefHelpers::PathSanity.sanitized_path if Chef::Config[:enforce_path_sanity]
run_ohai
generate_guid
@@ -825,7 +823,7 @@ class Chef
# @api private
#
def do_windows_admin_check
- if Chef::Platform.windows?
+ if ChefHelpers.windows?
logger.trace("Checking for administrator privileges....")
if !has_admin_privileges?