summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2018-07-16 22:34:50 -0700
committerSamuel Giddins <segiddins@segiddins.me>2018-07-29 16:50:25 -0700
commit946e801679f9279b917a0e4427be6f71a1535011 (patch)
tree7f5efd1fafd9b2449d2c0ae384acfda49a3ae231
parent42c4609e01c0869f5341f658d2a345a8969fa3e2 (diff)
downloadbundler-946e801679f9279b917a0e4427be6f71a1535011.tar.gz
[Settings] Append the ruby scope on Bundler 2 with a global path setting
-rw-r--r--lib/bundler/feature_flag.rb1
-rw-r--r--lib/bundler/settings.rb3
-rw-r--r--man/bundle-config.ronn3
3 files changed, 6 insertions, 1 deletions
diff --git a/lib/bundler/feature_flag.rb b/lib/bundler/feature_flag.rb
index f7bb5d1cf8..83e7ff0389 100644
--- a/lib/bundler/feature_flag.rb
+++ b/lib/bundler/feature_flag.rb
@@ -39,6 +39,7 @@ module Bundler
settings_flag(:disable_multisource) { bundler_2_mode? }
settings_flag(:error_on_stderr) { bundler_2_mode? }
settings_flag(:forget_cli_options) { bundler_2_mode? }
+ settings_flag(:global_path_appends_ruby_scope) { bundler_2_mode? }
settings_flag(:global_gem_cache) { bundler_2_mode? }
settings_flag(:init_gems_rb) { bundler_2_mode? }
settings_flag(:list_command) { bundler_2_mode? }
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index 83c119a562..e37bfb442a 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -35,6 +35,7 @@ module Bundler
frozen
gem.coc
gem.mit
+ global_path_appends_ruby_scope
global_gem_cache
ignore_messages
init_gems_rb
@@ -225,7 +226,7 @@ module Bundler
key = key_for(:path)
path = ENV[key] || @global_config[key]
if path && !@temporary.key?(key) && !@local_config.key?(key)
- return Path.new(path, false, false, false)
+ return Path.new(path, Bundler.feature_flag.global_path_appends_ruby_scope?, false, false)
end
system_path = self["path.system"] || (self[:disable_shared_gems] == false)
diff --git a/man/bundle-config.ronn b/man/bundle-config.ronn
index 15f78937dd..4d8bda61f7 100644
--- a/man/bundle-config.ronn
+++ b/man/bundle-config.ronn
@@ -198,6 +198,9 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
* `global_gem_cache` (`BUNDLE_GLOBAL_GEM_CACHE`):
Whether Bundler should cache all gems globally, rather than locally to the
installing Ruby installation.
+* `global_path_appends_ruby_scope` (`BUNDLE_GLOBAL_PATH_APPENDS_RUBY_SCOPE`):
+ Whether Bundler should append the Ruby scope (e.g. engine and ABI version)
+ to a globally-configured path.
* `ignore_messages` (`BUNDLE_IGNORE_MESSAGES`): When set, no post install
messages will be printed. To silence a single gem, use dot notation like
`ignore_messages.httparty true`.