diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/environment_preserver.rb | 1 | ||||
-rw-r--r-- | lib/bundler/self_manager.rb | 1 | ||||
-rw-r--r-- | lib/bundler/version.rb | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler/environment_preserver.rb b/lib/bundler/environment_preserver.rb index 444ab6fd37..5e9a44ab5d 100644 --- a/lib/bundler/environment_preserver.rb +++ b/lib/bundler/environment_preserver.rb @@ -6,6 +6,7 @@ module Bundler BUNDLER_KEYS = %w[ BUNDLE_BIN_PATH BUNDLE_GEMFILE + BUNDLER_3_MODE BUNDLER_VERSION BUNDLER_SETUP GEM_HOME diff --git a/lib/bundler/self_manager.rb b/lib/bundler/self_manager.rb index 72bcb264ab..0ee111f23e 100644 --- a/lib/bundler/self_manager.rb +++ b/lib/bundler/self_manager.rb @@ -105,6 +105,7 @@ module Bundler def autoswitching_applies? ENV["BUNDLER_VERSION"].nil? && + ENV["BUNDLER_3_MODE"].nil? && ruby_can_restart_with_same_arguments? && lockfile_version end diff --git a/lib/bundler/version.rb b/lib/bundler/version.rb index fa24b4966e..8ac9588fb7 100644 --- a/lib/bundler/version.rb +++ b/lib/bundler/version.rb @@ -1,7 +1,7 @@ # frozen_string_literal: false module Bundler - VERSION = "2.7.0.dev".freeze + VERSION = (ENV["BUNDLER_3_MODE"] == "true" ? "3.0.0" : "2.7.0.dev").freeze def self.bundler_major_version @bundler_major_version ||= VERSION.split(".").first.to_i |