Exception: Berkshelf::GitCommandError

Inherits:
GitError show all
Defined in:
lib/berkshelf/errors.rb

Instance Method Summary collapse

Methods inherited from BerkshelfError

set_status_code

Constructor Details

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

Returns a new instance of GitCommandError.


508
509
510
511
512
513
514
515
516
517
518
# File 'lib/berkshelf/errors.rb', line 508

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