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.



571
572
573
574
575
576
577
578
579
580
581
# File 'lib/berkshelf/errors.rb', line 571

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