From ebd36d97cfa1db8fa1b6fbe63d76012bc140a3a0 Mon Sep 17 00:00:00 2001 From: Gabriel Arjones Date: Thu, 4 Jan 2024 11:01:36 -0300 Subject: [PATCH] fix: pin bundler version on ruby < 3 --- bin/autoproj_bootstrap | 6 +++++- bin/autoproj_install | 6 +++++- lib/autoproj/ops/install.rb | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/bin/autoproj_bootstrap b/bin/autoproj_bootstrap index 57ca2073..e1d13d9c 100644 --- a/bin/autoproj_bootstrap +++ b/bin/autoproj_bootstrap @@ -760,7 +760,11 @@ require 'bundler/setup' end def self.default_bundler_version - "2.3.6" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.6.0") + if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.6.0") + "2.3.6" + elsif Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.0.0") + "2.4.22" + end end def save_config diff --git a/bin/autoproj_install b/bin/autoproj_install index 23209a80..0b24ecb6 100644 --- a/bin/autoproj_install +++ b/bin/autoproj_install @@ -760,7 +760,11 @@ require 'bundler/setup' end def self.default_bundler_version - "2.3.6" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.6.0") + if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.6.0") + "2.3.6" + elsif Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.0.0") + "2.4.22" + end end def save_config diff --git a/lib/autoproj/ops/install.rb b/lib/autoproj/ops/install.rb index 1a230c73..75f21a72 100644 --- a/lib/autoproj/ops/install.rb +++ b/lib/autoproj/ops/install.rb @@ -750,7 +750,11 @@ def load_config end def self.default_bundler_version - "2.3.6" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.6.0") + if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.6.0") + "2.3.6" + elsif Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.0.0") + "2.4.22" + end end def save_config