diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-02 15:09:07 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-02 15:09:07 -0700 |
commit | 7a1a6c8ef26c787e4b6dd1602f3d158b37e81720 (patch) | |
tree | 1e390cd535b38368d091cbb33e5d419408d5ce00 /lib/chef/platform | |
parent | 77f8739a4741e2370e40ec39345a92a6ea393a1a (diff) | |
download | chef-7a1a6c8ef26c787e4b6dd1602f3d158b37e81720.tar.gz |
fix Layout/EmptyLineAfterGuardClause
i like this one, gives visual priority to returns or raises that are
buried in the middle of things.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/platform')
-rw-r--r-- | lib/chef/platform/query_helpers.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef/platform/query_helpers.rb b/lib/chef/platform/query_helpers.rb index 6e56eba120..ffcd7e0bd9 100644 --- a/lib/chef/platform/query_helpers.rb +++ b/lib/chef/platform/query_helpers.rb @@ -26,6 +26,7 @@ class Chef def windows_nano_server? return false unless windows? + require "win32/registry" unless defined?(Win32::Registry) # This method may be called before ohai runs (e.g., it may be used to @@ -48,6 +49,7 @@ class Chef def supports_msi? return false unless windows? + require "win32/registry" unless defined?(Win32::Registry) key = "System\\CurrentControlSet\\Services\\msiserver" @@ -90,6 +92,7 @@ class Chef def supported_powershell_version?(node, version_string) return false unless node[:languages] && node[:languages][:powershell] + require "rubygems" unless defined?(Gem) Gem::Version.new(node[:languages][:powershell][:version]) >= Gem::Version.new(version_string) |