Class: Tara::Shell
- Inherits:
-
Object
- Object
- Tara::Shell
- Defined in:
- lib/tara/shell.rb
Class Method Summary collapse
Class Method Details
.exec(command) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/tara/shell.rb', line 6 def self.exec(command) output = %x(#{command}) $stderr.puts(%(#{command}: #{output})) if ENV['TARA_DEBUG'] unless $?.success? raise ExecError, %(Command `#{command}` failed with output: #{output}) end output end |