summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/provider/dsc_resource.rb13
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