summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaire McQuin <claire@getchef.com>2014-06-19 15:49:38 -0700
committerClaire McQuin <claire@getchef.com>2014-06-19 15:49:38 -0700
commit968da8d21d85e7e1f5750b5faed7df781dd4d7c7 (patch)
tree654b02745984b05e293685cdeb8fb6ad1d2202ad
parentf4fc9dfa580997369952e9d26da2bb63dc9d569d (diff)
downloadchef-968da8d21d85e7e1f5750b5faed7df781dd4d7c7.tar.gz
include module on windows only
-rw-r--r--lib/chef/provider/env/windows.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/chef/provider/env/windows.rb b/lib/chef/provider/env/windows.rb
index a5f4b8148e..96b5d3871f 100644
--- a/lib/chef/provider/env/windows.rb
+++ b/lib/chef/provider/env/windows.rb
@@ -16,15 +16,13 @@
# limitations under the License.
#
-if RUBY_PLATFORM =~ /mswin|mingw32|windows/
- require 'chef/win32/api/system'
-end
+require 'chef/win32/api/system' if RUBY_PLATFORM =~ /mswin|mingw32|windows/
class Chef
class Provider
class Env
class Windows < Chef::Provider::Env
- include Chef::ReservedNames::Win32::API::System
+ include Chef::ReservedNames::Win32::API::System if RUBY_PLATFORM =~ /mswin|mingw32|windows/
def create_env
obj = env_obj(@new_resource.key_name)