Exception: Berkshelf::GitError

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

Direct Known Subclasses

AmbiguousGitRef, InvalidGitRef, PrivateGitRepo

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BerkshelfError

status_code

Constructor Details

#initialize(stderr) ⇒ GitError

Returns a new instance of GitError.



30
31
32
# File 'lib/berkshelf/errors.rb', line 30

def initialize(stderr)
  @stderr = stderr
end

Instance Attribute Details

#stderrObject (readonly)

Returns the value of attribute stderr.



28
29
30
# File 'lib/berkshelf/errors.rb', line 28

def stderr
  @stderr
end

Instance Method Details

#to_sObject



34
35
36
37
# File 'lib/berkshelf/errors.rb', line 34

def to_s
  out = "An error occured during Git execution:\n"
  out << stderr.prepend_each("\n", "\t")
end