Module: MyStuff::SystemWithTweaks

Defined in:
lib/dolzenko/includable_with_options.rb

Instance Method Summary collapse

Instance Method Details

#system(*args) ⇒ Object



48
49
50
51
52
53
54
# File 'lib/dolzenko/includable_with_options.rb', line 48

def system(*args)
  puts "@@system_with_tweaks_options #{ @@system_with_tweaks_options }"
  puts "Executing command: #{ args.join(" ") }" if @@system_with_tweaks_options[:echo]
  result = Kernel.system(*args)
  raise "Command #{ args.join(" ") } exited with a nonzero exit status" if @@system_with_tweaks_options[:raise_exceptions]
  result
end