module Kernel
Public Instance Methods
run(*args)
click to toggle source
# File lib/Kernel/run.rb, line 27 def run(*args) options = args.extract_options! command = args if options[:show] && !options[:dry_run] puts command.join(' ') elsif options[:show] && options[:dry_run] puts "DRY RUN *** #{command.join(' ')} *** DRY RUN" end unless options[:dry_run] system(*command) if !$?.success? && !options[:dont_raise] raise "#{command.inspect} failed to exit cleanly." end end end