Exception: Git::VersionError
Overview
Raised when the installed git version does not meet requirements
This error is raised when:
- The installed git version is below
Git::MINIMUM_GIT_VERSION - A command requires a minimum git version that isn't met
- A command was removed in a git version older than the installed version
Instance Attribute Summary collapse
-
#actual_version ⇒ Git::Version
readonly
The installed git version that caused the error.
-
#constraint ⇒ Git::VersionConstraint
readonly
The version constraint that was violated.
-
#subject ⇒ #to_s
readonly
The entity that has the version requirement.
Instance Method Summary collapse
-
#initialize(subject:, constraint:, actual_version:) ⇒ VersionError
constructor
Create a VersionError.
Constructor Details
#initialize(subject:, constraint:, actual_version:) ⇒ VersionError
Create a VersionError
240 241 242 243 244 245 |
# File 'lib/git/errors.rb', line 240 def initialize(subject:, constraint:, actual_version:) @subject = subject @constraint = constraint @actual_version = actual_version super() end |
Instance Attribute Details
#actual_version ⇒ Git::Version (readonly)
The installed git version that caused the error
263 264 265 |
# File 'lib/git/errors.rb', line 263 def actual_version @actual_version end |
#constraint ⇒ Git::VersionConstraint (readonly)
The version constraint that was violated
257 258 259 |
# File 'lib/git/errors.rb', line 257 def constraint @constraint end |
#subject ⇒ #to_s (readonly)
The entity that has the version requirement
251 252 253 |
# File 'lib/git/errors.rb', line 251 def subject @subject end |