Module: Chef::Mixin::ShellOut
- Included in:
- Cookbook::SyntaxCheck, Knife::CookbookSCMRepo, Provider::Execute, Provider::Git, Provider::Group::Gpasswd, Provider::Group::Suse, Provider::Link, Provider::Mdadm, Provider::Mount::Mount, Provider::Package::Apt, Provider::Package::EasyInstall, Provider::Package::Freebsd, Provider::Package::Rubygems, Provider::Package::Rubygems::AlternateGemEnvironment, Provider::Service::Redhat, Provider::User::Dscl, 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 |
# File 'lib/chef/mixin/shell_out.rb', line 25 def shell_out(*command_args) cmd = Chef::ShellOut.new(*command_args) if STDOUT.tty? && !Chef::Config[:daemon] && Chef::Log.debug? cmd.live_stream = STDOUT end cmd.run_command cmd end |
#shell_out!(*command_args) ⇒ Object
34 35 36 37 38 |
# File 'lib/chef/mixin/shell_out.rb', line 34 def shell_out!(*command_args) cmd= shell_out(*command_args) cmd.error! cmd end |