# encoding: utf-8

module Tara
  class Shell
    def self.exec(command)
      output = %x(#{command})
      unless $?.success?
        raise ExecError, %(Command `#{command}` failed with output: #{output})
      end
      output
    end
  end
end

# encoding: utf-8

module Tara
  class Shell
    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
  end
end

Add debug statement to Shell.exec
Add debug statement to Shell.exec

For, you know, debugging purposes. I’d prefer to have some kind of
logger, but for now this’ll work.