Module: Kernel
- Defined in:
- lib/Kernel/run.rb
Instance Method Summary collapse
Instance Method Details
#run(*args) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/Kernel/run.rb', line 27 def run(*args) = args. command = args if [:show] && ![:dry_run] puts command.join(' ') elsif [:show] && [:dry_run] puts "DRY RUN *** #{command.join(' ')} *** DRY RUN" end unless [:dry_run] system(*command) if !$?.success? && ![:dont_raise] raise "#{command.inspect} failed to exit cleanly." end end end |