Exception: CookbookOmnifetch::GitCommandError

Inherits:
GitError show all
Defined in:
lib/cookbook-omnifetch/exceptions.rb

Instance Method Summary collapse

Methods inherited from OmnifetchError

status_code

Constructor Details

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

Returns a new instance of GitCommandError.



30
31
32
33
34
35
36
37
38
39
40
# File 'lib/cookbook-omnifetch/exceptions.rb', line 30

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