Module: Lambom::ShellMixin
- Included in:
- Converger
- Defined in:
- lib/lambom/shell_mixin.rb
Instance Method Summary collapse
Instance Method Details
#run_cmd(*cmd) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/lambom/shell_mixin.rb', line 5 def run_cmd(*cmd) opts = {} if $debug puts "RUN_CMD: #{cmd}" opts = {:live_stream => STDOUT} end com = Mixlib::ShellOut.new(cmd, opts) com.run_command com.error! puts "output: #{com.stdout}" if $debug com.stdout end |