summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-03-18 08:57:03 -0700
committerGitHub <noreply@github.com>2020-03-18 08:57:03 -0700
commit2053ef67f1fd26551edde4eb5a9101893b617e12 (patch)
treeb086d78c85d4eb5ba174d3b8b727cdd1398067b2 /lib
parente0e731d8cb30cecadf809b1ab1bae58793aacc8e (diff)
parent7b657b8aed794bee21c99bf532588109b7cea070 (diff)
downloadchef-2053ef67f1fd26551edde4eb5a9101893b617e12.tar.gz
Merge pull request #9492 from MsysTechnologiesllc/sangmesh/Fixed_Use_Ohai_data_to_determine_if_we_have_PowerShell_installed
powershell_package: Use ohai data to get the powershell release instead of shelling out
Diffstat (limited to 'lib')
-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 a27f7fa6c8..01fe603363 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 powershell_out("$PSVersionTable.PSVersion.Major").stdout.strip.to_i < 5
+ if powershell_version < 5
raise "Minimum installed PowerShell Version required is 5"
end