diff options
author | Lamont Granquist <454857+lamont-granquist@users.noreply.github.com> | 2021-12-08 11:16:54 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-08 11:16:54 -0800 |
commit | 2d4f0412bb5c0ed7606c1d5f91fd42e4b3ce6c3d (patch) | |
tree | 66db3d02a683711724e742abeed6b62e0c810f4c | |
parent | 0f01c826dcf5b5b05a9aad05bf885e58ad04135e (diff) | |
parent | ea8c704281686840e274da3d35d34b1e2e08cadc (diff) | |
download | chef-2d4f0412bb5c0ed7606c1d5f91fd42e4b3ce6c3d.tar.gz |
Merge pull request #12355 from chef/fix-windows-feature-powershell-json-error
-rw-r--r-- | lib/chef/resource/windows_feature_powershell.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/chef/resource/windows_feature_powershell.rb b/lib/chef/resource/windows_feature_powershell.rb index 70c7de5783..00b36f33fd 100644 --- a/lib/chef/resource/windows_feature_powershell.rb +++ b/lib/chef/resource/windows_feature_powershell.rb @@ -216,8 +216,7 @@ class Chef def parsed_feature_list # Grab raw feature information from WindowsFeature raw_list_of_features = powershell_exec!("Get-WindowsFeature | Select-Object -Property Name,InstallState", timeout: new_resource.timeout).result - - Chef::JSONCompat.from_json(raw_list_of_features) + raw_list_of_features || [] end # add the features values to the appropriate array |