Method: Berkshelf::GitCommandError#initialize

Defined in:
lib/berkshelf/errors.rb

#initialize(command, path, stderr = nil) ⇒ GitCommandError

Returns a new instance of GitCommandError.



574
575
576
577
578
579
580
581
582
583
584
# File 'lib/berkshelf/errors.rb', line 574

def initialize(command, path, stderr = nil)
  out =  "Git error: command `git #{command}` failed. If this error "
  out << "persists, try removing the cache directory at '#{path}'."

  if stderr
    out << "Output from the command:\n\n"
    out << stderr
  end

  super(out)
end