diff options
author | Adam Edwards <adamed@opscode.com> | 2014-08-28 06:10:48 -0700 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2014-09-19 12:47:32 -0700 |
commit | 82f957acf2e17eeeb6415f804f082a5beb6b0d3d (patch) | |
tree | fa340019ae4dd40ff04479963816ff2dd6245833 /lib/chef/provider/dsc_script.rb | |
parent | d3f113b42eb96582752c3141ac2054dc2c407374 (diff) | |
download | chef-82f957acf2e17eeeb6415f804f082a5beb6b0d3d.tar.gz |
DSC: Added test for dsc_script provider
Diffstat (limited to 'lib/chef/provider/dsc_script.rb')
-rw-r--r-- | lib/chef/provider/dsc_script.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/provider/dsc_script.rb b/lib/chef/provider/dsc_script.rb index 122b7e6198..a1bb9c63a7 100644 --- a/lib/chef/provider/dsc_script.rb +++ b/lib/chef/provider/dsc_script.rb @@ -98,7 +98,9 @@ class Chef if @dsc_resource.command generator.configuration_document_from_script_path(@dsc_resource.command, configuration_name, configuration_flags, shellout_flags) else - generator.configuration_document_from_script_code(@dsc_resource.code, configuration_flags, shellout_flags) + # If code is also not provided, we mimic what the other script resources do (execute nothing) + Chef::Log.warn("Neither code or command were provided for dsc_resource[#{@dsc_resource.name}].") unless @dsc_resource.code + generator.configuration_document_from_script_code(@dsc_resource.code || '', configuration_flags, shellout_flags) end end |