summaryrefslogtreecommitdiff
path: root/lib/bundler/templates
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-08-19 18:17:47 -0400
committerSamuel Giddins <segiddins@segiddins.me>2017-08-25 15:56:23 -0400
commit85a5d361d06694e96e91c7f833c746803699342a (patch)
treea5aef2c83ce284894f6c199ce6a5293d1260984d /lib/bundler/templates
parent3203fdd2ad861af2aedfa233b754a02bfc1c4741 (diff)
downloadbundler-85a5d361d06694e96e91c7f833c746803699342a.tar.gz
When the locked bundler is under 2.0, allow any version < 2
Diffstat (limited to 'lib/bundler/templates')
-rw-r--r--lib/bundler/templates/Executable.bundler3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bundler/templates/Executable.bundler b/lib/bundler/templates/Executable.bundler
index 085955c7a9..ccb9627ca5 100644
--- a/lib/bundler/templates/Executable.bundler
+++ b/lib/bundler/templates/Executable.bundler
@@ -66,6 +66,9 @@ m = Module.new do
end
def activate_bundler(bundler_version)
+ if Gem::Version.correct?(bundler_version) && Gem::Version.new(bundler_version).release < Gem::Version.new("2.0")
+ bundler_version = "< 2"
+ end
gem_error = activation_error_handling do
gem "bundler", bundler_version
end