summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Edwards <adamed@opscode.com>2014-05-03 07:14:19 -0700
committersersut <serdar@opscode.com>2014-05-30 13:05:48 -0700
commitb8238c9c6bb59b906554e8d9bad4169589e5071d (patch)
tree2f29131acb6ee96a330615df6ffdaa001b429949
parent4d0879f67de2af0b3047ad4dda67fa2f6bd6dae0 (diff)
downloadchef-b8238c9c6bb59b906554e8d9bad4169589e5071d.tar.gz
Move Windows-only deps to Windows only code path
-rw-r--r--lib/chef/platform/query_helpers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/platform/query_helpers.rb b/lib/chef/platform/query_helpers.rb
index a990535069..fd9873ecbe 100644
--- a/lib/chef/platform/query_helpers.rb
+++ b/lib/chef/platform/query_helpers.rb
@@ -16,8 +16,6 @@
# limitations under the License.
#
-require 'chef/win32/wmi'
-
class Chef
class Platform
@@ -33,6 +31,8 @@ class Chef
def windows_server_2003?
return false unless windows?
+ require 'chef/win32/wmi'
+
# CHEF-4888: Work around ruby #2618, expected to be fixed in Ruby 2.1.0
# https://github.com/ruby/ruby/commit/588504b20f5cc880ad51827b93e571e32446e5db
# https://github.com/ruby/ruby/commit/27ed294c7134c0de582007af3c915a635a6506cd