summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <454857+lamont-granquist@users.noreply.github.com>2021-12-08 11:16:54 -0800
committerGitHub <noreply@github.com>2021-12-08 11:16:54 -0800
commit2d4f0412bb5c0ed7606c1d5f91fd42e4b3ce6c3d (patch)
tree66db3d02a683711724e742abeed6b62e0c810f4c
parent0f01c826dcf5b5b05a9aad05bf885e58ad04135e (diff)
parentea8c704281686840e274da3d35d34b1e2e08cadc (diff)
downloadchef-2d4f0412bb5c0ed7606c1d5f91fd42e4b3ce6c3d.tar.gz
Merge pull request #12355 from chef/fix-windows-feature-powershell-json-error
-rw-r--r--lib/chef/resource/windows_feature_powershell.rb3
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