Method: Git::Lib.warn_if_old_command

Defined in:
lib/git/lib.rb

.warn_if_old_command(lib)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

rubocop:disable Naming/PredicateMethod



1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
# File 'lib/git/lib.rb', line 1671

def self.warn_if_old_command(lib) # rubocop:disable Naming/PredicateMethod
  Git::Deprecation.warn('Git::Lib#warn_if_old_command is deprecated. Use meets_required_version?.')

  return true if @version_checked

  @version_checked = true
  unless lib.meets_required_version?
    warn "[WARNING] The git gem requires git #{lib.required_command_version.join('.')} or later, " \
         "but only found #{lib.current_command_version.join('.')}. You should probably upgrade."
  end
  true
end