Module: Chef::Mixin::ShellOut

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