Changed name of git check method to be more descriptive.
This commit is contained in:
@@ -11,7 +11,7 @@ module Homesick
|
||||
}
|
||||
STRING = MIN_VERSION.values.join('.')
|
||||
|
||||
def version_check
|
||||
def git_version_correct?
|
||||
info = `git --version`.scan(/(\d+)\.(\d+)\.(\d+)/).flatten.map(&:to_i)
|
||||
return false unless info.count == 3
|
||||
current_version = Hash[ [:major, :minor, :patch].zip(info) ]
|
||||
|
||||
@@ -20,7 +20,7 @@ module Homesick
|
||||
def initialize(args = [], options = {}, config = {})
|
||||
super
|
||||
# Check if git is installed
|
||||
unless version_check
|
||||
unless git_version_correct?
|
||||
say_status :error, "Git version >= #{Homesick::Actions::GitActions::STRING} must be installed to use Homesick", :red
|
||||
exit(1)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user