summaryrefslogtreecommitdiff
path: root/lib/ohai
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2021-10-21 13:48:34 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2021-10-21 13:48:34 -0700
commita098e163490ad6604338d3d04fed601d18255693 (patch)
treea309db7704ec70863c930f2722deac864e176e81 /lib/ohai
parent3a3c2f601a0416e819a803762640f7c6ee869ac9 (diff)
downloadohai-a098e163490ad6604338d3d04fed601d18255693.tar.gz
move require to top of definitionlcg/fix-deprecation-error
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/ohai')
-rw-r--r--lib/ohai/plugins/filesystem.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ohai/plugins/filesystem.rb b/lib/ohai/plugins/filesystem.rb
index 7de1ddee..51e53c73 100644
--- a/lib/ohai/plugins/filesystem.rb
+++ b/lib/ohai/plugins/filesystem.rb
@@ -23,6 +23,8 @@
# limitations under the License.
#
+require "set" unless defined?(Set)
+
Ohai.plugin(:Filesystem) do
provides "filesystem".freeze
@@ -697,7 +699,6 @@ Ohai.plugin(:Filesystem) do
end
collect_data(:windows) do
- require "set" # rubocop: disable Chef/Ruby/UnlessDefinedRequire
require "wmi-lite/wmi" unless defined?(WmiLite::Wmi)
require_relative "../mash"