summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-07-05 12:16:22 -0700
committerTim Smith <tsmith@chef.io>2018-07-05 12:16:22 -0700
commitf5555cfd1ccdbf709aa4b56499f558361308bcec (patch)
tree857f8c59eaf57d5a84ded8e618324e04632ea084
parentd3d4198c971830715bbf4f5feee7e9f61503f9df (diff)
downloadchef-f5555cfd1ccdbf709aa4b56499f558361308bcec.tar.gz
windows_feature_powershell: Don't error on PowerShell 3.0
It should fail on less than 3.0, but not 3.0 Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/resource/windows_feature_powershell.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/resource/windows_feature_powershell.rb b/lib/chef/resource/windows_feature_powershell.rb
index daee0e9d34..c06e380675 100644
--- a/lib/chef/resource/windows_feature_powershell.rb
+++ b/lib/chef/resource/windows_feature_powershell.rb
@@ -149,7 +149,7 @@ class Chef
# @raise [RuntimeError] Raise if powershell is < 3.0
def raise_on_old_powershell
# be super defensive about the powershell lang plugin not being there
- return if node["languages"] && node["languages"]["powershell"] && node["languages"]["powershell"]["version"].to_i > 3
+ return if node["languages"] && node["languages"]["powershell"] && node["languages"]["powershell"]["version"].to_i >= 3
raise "The windows_feature_powershell resource requires PowerShell 3.0 or later. Please install PowerShell 3.0+ before running this resource." if powershell_version < 3
end