summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKartik Null Cating-Subramanian <ksubramanian@chef.io>2015-05-29 16:45:31 -0400
committerKartik Null Cating-Subramanian <ksubramanian@chef.io>2015-05-29 16:45:31 -0400
commit123088da347c3c9962e3626b0a51f82fa2e8669c (patch)
tree0b1cfa741cc332fc2e730d6cc417aae5b0fa6c97
parent8e3e5248ba0d2fbae7aba15129b635ee6c2587c6 (diff)
parent75588fc3537c56ffc7dbf85848fda51e50dacf8c (diff)
downloadchef-123088da347c3c9962e3626b0a51f82fa2e8669c.tar.gz
Merge pull request #3448 from chef/jdm/wmf
Fix dsc_resource to work with wmf5 april preview
-rw-r--r--lib/chef/provider/dsc_resource.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/chef/provider/dsc_resource.rb b/lib/chef/provider/dsc_resource.rb
index 2812c154c6..5fa84a21e9 100644
--- a/lib/chef/provider/dsc_resource.rb
+++ b/lib/chef/provider/dsc_resource.rb
@@ -121,7 +121,14 @@ class Chef
# however Invoke-DscResource is not correctly writing to that
# stream and instead just dumping to stdout
@converge_description = result.stdout
- result.return_value[0]["InDesiredState"]
+
+ if result.return_value.is_a?(Array)
+ # WMF Feb 2015 Preview
+ result.return_value[0]["InDesiredState"]
+ else
+ # WMF April 2015 Preview
+ result.return_value["InDesiredState"]
+ end
end
def set_resource