Exception: Berkshelf::GitLocation::GitCommandError

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

Instance Method Summary collapse

Methods inherited from BerkshelfError

status_code

Constructor Details

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

Returns a new instance of GitCommandError.



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/berkshelf/locations/git.rb', line 16

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