diff options
author | adamedx <admed@opscode.com> | 2013-01-25 16:33:43 -0800 |
---|---|---|
committer | adamedx <adamed@opscode.com> | 2013-02-19 09:32:06 -0800 |
commit | 63d34bb7887606ee5d55ad70264ff14a90aa3f09 (patch) | |
tree | b2cb0ecabe8bc73195f46bb8e631374207e72ec7 /lib/chef/provider/script.rb | |
parent | 5e9dad16efadd17c046654895095dcb7d2052612 (diff) | |
download | chef-63d34bb7887606ee5d55ad70264ff14a90aa3f09.tar.gz |
OC-4739: OC-4748: Create powershell and batch providers in core Chef
Diffstat (limited to 'lib/chef/provider/script.rb')
-rw-r--r-- | lib/chef/provider/script.rb | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/chef/provider/script.rb b/lib/chef/provider/script.rb index 9e5a7d7fe1..5c3d2ebb33 100644 --- a/lib/chef/provider/script.rb +++ b/lib/chef/provider/script.rb @@ -29,7 +29,7 @@ class Chef set_owner_and_group - @new_resource.command("\"#{@new_resource.interpreter}\" #{@new_resource.flags} \"#{script_file.path}\"") + @new_resource.command("\"#{interpreter}\" #{flags} \"#{interpreter_script_path}\"") super converge_by(nil) do # ensure script is unlinked at end of converge! @@ -52,6 +52,20 @@ class Chef @script_file && @script_file.close! end + def interpreter + @new_resource.interpreter + end + + def flags + @new_resource.flags + end + + protected + + def interpreter_script_path + @script_file.path + end + end end end |