diff options
author | Salim Alam <salam@chef.io> | 2015-11-19 11:25:14 -0800 |
---|---|---|
committer | Salim Alam <salam@chef.io> | 2015-11-19 11:25:14 -0800 |
commit | d0ab315773aec175ffb41f6ab8a8afcccdf88a50 (patch) | |
tree | 7a0a364a57e91f0a5d90e1cd1f9dbf9bdce9e3a4 /lib/chef/provider | |
parent | 09cd994c9094054d5a9efe8c2f7efbdf22cd7d64 (diff) | |
download | chef-d0ab315773aec175ffb41f6ab8a8afcccdf88a50.tar.gz |
Update dsc_resource to use verbose stream outputsalam/dsc-resource-fix
Diffstat (limited to 'lib/chef/provider')
-rw-r--r-- | lib/chef/provider/dsc_resource.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/chef/provider/dsc_resource.rb b/lib/chef/provider/dsc_resource.rb index 212e3b0e09..efbe4eccef 100644 --- a/lib/chef/provider/dsc_resource.rb +++ b/lib/chef/provider/dsc_resource.rb @@ -122,10 +122,15 @@ class Chef def test_resource result = invoke_resource(:test) + @converge_description = result.stream(:verbose) + # We really want this information from the verbose stream, - # however Invoke-DscResource is not correctly writing to that - # stream and instead just dumping to stdout - @converge_description = result.stdout + # however in some versions of WMF, Invoke-DscResource is not correctly + # writing to that stream and instead just dumping to stdout + if @converge_description.empty? + @converge_description = result.stdout + end + return_dsc_resource_result(result, "InDesiredState") end @@ -186,4 +191,4 @@ class Chef end end end -end
\ No newline at end of file +end |