summaryrefslogtreecommitdiff
path: root/lib/chef/provider
diff options
context:
space:
mode:
authorStuart Preston <stuart@chef.io>2018-04-21 09:04:16 +0200
committerStuart Preston <stuart@chef.io>2018-04-21 09:04:16 +0200
commit1b88dea1e0b7771251ac4ba75590f64e6d6cb7ae (patch)
tree928f44c84bc935b90d7ed521abde7645b2746493 /lib/chef/provider
parentd6b8aa701aea18db31b4d9ec2943aa6bfb0efc4e (diff)
downloadchef-1b88dea1e0b7771251ac4ba75590f64e6d6cb7ae.tar.gz
Fixing specs for powershell_packagesp/fix7166
Signed-off-by: Stuart Preston <stuart@chef.io>
Diffstat (limited to 'lib/chef/provider')
-rw-r--r--lib/chef/provider/package/powershell.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/package/powershell.rb b/lib/chef/provider/package/powershell.rb
index a7aa6cb223..44b6e69a00 100644
--- a/lib/chef/provider/package/powershell.rb
+++ b/lib/chef/provider/package/powershell.rb
@@ -36,7 +36,7 @@ class Chef
def define_resource_requirements
super
- if node['languages']['powershell']['version'].to_i < 5
+ if powershell_out("$PSVersionTable.PSVersion.Major").stdout.strip.to_i < 5
raise "Minimum installed Powershell Version required is 5"
end
requirements.assert(:install) do |a|