summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrishichawda <rishichawda@users.noreply.github.com>2021-12-08 10:19:14 +0530
committerrishichawda <rishichawda@users.noreply.github.com>2021-12-08 10:34:27 +0530
commitea8c704281686840e274da3d35d34b1e2e08cadc (patch)
tree66db3d02a683711724e742abeed6b62e0c810f4c
parent0f01c826dcf5b5b05a9aad05bf885e58ad04135e (diff)
downloadchef-fix-windows-feature-powershell-json-error.tar.gz
remove unnecessary from_json callfix-windows-feature-powershell-json-error
Signed-off-by: rishichawda <rishichawda@users.noreply.github.com>
-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