diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-11-08 14:06:33 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-11-08 14:06:33 -0800 |
commit | 8a7e29d52882c39d0c903eef83bd3472e4f334af (patch) | |
tree | a25a7b76416e07ebdb54e569fb0006079cf012db /lib/chef/application.rb | |
parent | c31625406530b560fab02b11fa2447955ed2faef (diff) | |
download | chef-8a7e29d52882c39d0c903eef83bd3472e4f334af.tar.gz |
Add chef-utils gem with various recipe DSL helpers
This is the implementation of [RFC-087](https://github.com/chef-boneyard/chef-rfc/blob/master/rfc087-distro-sugar-helpers.md)
although some of the specifics have been iterated on and changed.
The documentation will be in the [README.md](https://github.com/chef/chef/tree/master/chef-utils/README.md) once this is merged.
While this PR mostly moves chef-sugar utilities into core-chef via this chef-utils gem, the scope of the chef-utils gem
should be considered larger than just that. As an example this PR moves the Mash class into this gem for reuse in ohai
as well.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/application.rb')
-rw-r--r-- | lib/chef/application.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/application.rb b/lib/chef/application.rb index 36cb4401c9..a793a91909 100644 --- a/lib/chef/application.rb +++ b/lib/chef/application.rb @@ -78,7 +78,7 @@ class Chef Chef::Application.fatal!("SIGTERM received, stopping", Chef::Exceptions::SigTerm.new) end - unless Chef::Platform.windows? + unless ChefUtils.windows? trap("QUIT") do logger.info("SIGQUIT received, call stack:\n " + caller.join("\n ")) end @@ -305,7 +305,7 @@ class Chef # win32-process gem exposes some form of :fork for Process # class. So we are separately ensuring that the platform we're # running on is not windows before forking. - chef_config[:client_fork] && Process.respond_to?(:fork) && !Chef::Platform.windows? + chef_config[:client_fork] && Process.respond_to?(:fork) && !ChefUtils.windows? end # Run chef-client once and then exit. If TERM signal is received, ignores the |