Method: Docman::GitUtil.exec
- Defined in:
- lib/docman/git_util.rb
.exec(command, show_result = true) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/docman/git_util.rb', line 10 def self.exec(command, show_result = true) @logger.info "#{@git} #{command}" result = `#{@git} #{command}`.delete!("\n") @logger.info result if show_result and result raise "ERROR: #{result}" unless $?.exitstatus == 0 result end |