summaryrefslogtreecommitdiff
path: root/lib/chef/resource
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-05-08 21:49:16 -0700
committerGitHub <noreply@github.com>2019-05-08 21:49:16 -0700
commitbbd66e41a06ee18d379264bc0063b854efe1bed6 (patch)
tree0326871f52a654915d1cf0592f48b8d53c07ca73 /lib/chef/resource
parentbc73e02e60a575c066085b7e8acdcc360192036e (diff)
parent0c0af747b18a1a9c8f9cfcf5e1711ba483df0b97 (diff)
downloadchef-bbd66e41a06ee18d379264bc0063b854efe1bed6.tar.gz
Merge pull request #8492 from MsysTechnologiesllc/Kapil/MSYS-1006_chef_14_windows_feature_fails_on_windows_2008r2
windows_feature: Fix failures on windows 2008r2
Diffstat (limited to 'lib/chef/resource')
-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 e915621729..55513ea3ea 100644
--- a/lib/chef/resource/windows_feature_powershell.rb
+++ b/lib/chef/resource/windows_feature_powershell.rb
@@ -226,7 +226,7 @@ class Chef
# Grab raw feature information from dism command line
# Windows < 2012 doesn't present a state value so we have to check if the feature is installed or not
raw_list_of_features = if older_than_win_2012_or_8? # make the older format look like the new format, warts and all
- powershell_out!('Get-WindowsFeature | Select-Object -Property Name, @{Name=\"InstallState\"; Expression = {If ($_.Installed) { 1 } Else { 0 }}} | ConvertTo-Json -Compress', timeout: new_resource.timeout).stdout
+ powershell_out!('Get-WindowsFeature | Select-Object -Property Name, @{Name="InstallState"; Expression = {If ($_.Installed) { 1 } Else { 0 }}} | ConvertTo-Json -Compress', timeout: new_resource.timeout).stdout
else
powershell_out!("Get-WindowsFeature | Select-Object -Property Name,InstallState | ConvertTo-Json -Compress", timeout: new_resource.timeout).stdout
end