diff options
author | Tim Smith <tsmith@chef.io> | 2019-05-08 21:49:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-08 21:49:16 -0700 |
commit | bbd66e41a06ee18d379264bc0063b854efe1bed6 (patch) | |
tree | 0326871f52a654915d1cf0592f48b8d53c07ca73 | |
parent | bc73e02e60a575c066085b7e8acdcc360192036e (diff) | |
parent | 0c0af747b18a1a9c8f9cfcf5e1711ba483df0b97 (diff) | |
download | chef-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
-rw-r--r-- | lib/chef/resource/windows_feature_powershell.rb | 2 |
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 |