Module: Chef::Mixin::ShellOut
- Included in:
- Cookbook::SyntaxCheck, Provider::Execute, Provider::Link, Resource::Conditional
- Defined in:
- lib/chef/mixin/shell_out.rb
Instance Method Summary collapse
Instance Method Details
#shell_out(*command_args) ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/chef/mixin/shell_out.rb', line 25 def shell_out(*command_args) Chef::Log.debug "Shelling out: #{command_args.join(" ")}" cmd = Chef::ShellOut.new(*command_args) if STDOUT.tty? && Chef::Log.debug? cmd.live_stream = STDOUT end cmd.run_command cmd end |
#shell_out!(*command_args) ⇒ Object
35 36 37 38 39 |
# File 'lib/chef/mixin/shell_out.rb', line 35 def shell_out!(*command_args) cmd= shell_out(*command_args) cmd.error! cmd end |