method
warn_for_outdated_bundler_version
v2_6_3 -
Show latest stable
-
0 notes -
Class: LockfileParser
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3 (0)
- What's this?
warn_for_outdated_bundler_version()
public
Hide source
# File lib/bundler/lockfile_parser.rb, line 102 def warn_for_outdated_bundler_version return unless bundler_version prerelease_text = bundler_version.prerelease? ? " --pre" : "" current_version = Gem::Version.create(Bundler::VERSION) case current_version.segments.first <=> bundler_version.segments.first when -1 raise LockfileError, "You must use Bundler #{bundler_version.segments.first} or greater with this lockfile." when 0 if current_version < bundler_version Bundler.ui.warn "Warning: the running version of Bundler (#{current_version}) is older " "than the version that created the lockfile (#{bundler_version}). We suggest you " "upgrade to the latest version of Bundler by running `gem " "install bundler#{prerelease_text}`.\n" end end end