summaryrefslogtreecommitdiff
path: root/lib/chef/platform
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-06-09 17:05:52 -0700
committerTim Smith <tsmith@chef.io>2018-06-09 21:28:44 -0700
commit0d41d83a2d6fe29118669cf707962dcb31a58bb7 (patch)
treea85f11fb61594d84e6ed9f5118135e85bdfebff2 /lib/chef/platform
parent4e64fd215f637a0bd49c04cebb6f18446d57c3cf (diff)
downloadchef-0d41d83a2d6fe29118669cf707962dcb31a58bb7.tar.gz
Move the windows helper to query_helpers
Fix my typo too Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/platform')
-rw-r--r--lib/chef/platform/query_helpers.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/chef/platform/query_helpers.rb b/lib/chef/platform/query_helpers.rb
index b49010efc0..448885dfbc 100644
--- a/lib/chef/platform/query_helpers.rb
+++ b/lib/chef/platform/query_helpers.rb
@@ -20,6 +20,12 @@ class Chef
class Platform
class << self
+ # a simple helper to determine if we're on a windows release pre-2012 / 8
+ # @return [Boolean] Is the system older than Windows 8 / 2012
+ def older_than_win_2012_or_8?
+ node["platform_version"].to_f < 6.2
+ end
+
def windows?
ChefConfig.windows?
end