diff options
author | Salim Alam <salam@chef.io> | 2015-11-20 09:31:05 -0800 |
---|---|---|
committer | Salim Alam <salam@chef.io> | 2015-11-20 09:31:05 -0800 |
commit | 8d1257010fcdd413653af931cb495066d492830f (patch) | |
tree | d6d4650691f597cb564edd11110f4d30976b857d /lib/chef | |
parent | 044bd3db8dbe18d293a80d2209d64906f7f2107c (diff) | |
parent | d0ab315773aec175ffb41f6ab8a8afcccdf88a50 (diff) | |
download | chef-8d1257010fcdd413653af931cb495066d492830f.tar.gz |
Merge pull request #4188 from chef/salam/dsc-resource-fix
Update dsc_resource to use verbose stream output
Diffstat (limited to 'lib/chef')
-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 |