summaryrefslogtreecommitdiff
path: root/lib/chef/provider/script.rb
diff options
context:
space:
mode:
authoradamedx <adamed@opscode.com>2013-06-25 05:43:13 -0700
committeradamedx <adamed@opscode.com>2013-06-25 06:05:11 -0700
commitf35150c6f099180f4273a240664ec35668d66011 (patch)
tree799f968a62ced148dc1d18b945176e886b867d4c /lib/chef/provider/script.rb
parent5324bdd06ebaef013776950fb6ad97b78a8e9b1c (diff)
downloadchef-f35150c6f099180f4273a240664ec35668d66011.tar.gz
Add functional tests for exit code and flags, fix architecture test verification
Diffstat (limited to 'lib/chef/provider/script.rb')
-rw-r--r--lib/chef/provider/script.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/chef/provider/script.rb b/lib/chef/provider/script.rb
index f1b765d52a..1b459f36cf 100644
--- a/lib/chef/provider/script.rb
+++ b/lib/chef/provider/script.rb
@@ -23,8 +23,13 @@ class Chef
class Provider
class Script < Chef::Provider::Execute
+ def initialize(new_resource, run_context)
+ super
+ @code = @new_resource.code
+ end
+
def action_run
- script_file.puts(@new_resource.code)
+ script_file.puts(@code)
script_file.close
set_owner_and_group