diff options
author | Ellen Marie Dash <me@duckie.co> | 2023-09-29 22:59:01 -0400 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-10-11 19:07:28 +0000 |
commit | e84b73398b96ea7abbeb3a17caae71b365f5016d (patch) | |
tree | 6073cbe3f9d48d643bc81e505fe3d778f8658550 /lib/rubygems | |
parent | ee9cb86bb49db0fe1613a5121a89587630506780 (diff) | |
download | ruby-e84b73398b96ea7abbeb3a17caae71b365f5016d.tar.gz |
[rubygems/rubygems] Call check_that_user_bin_dir_is_in_path ANY time Gem.paths.home == Gem.user_dir.
(As opposed to only if `--user-install` is passed.)
https://github.com/rubygems/rubygems/commit/0b42d0e869
Diffstat (limited to 'lib/rubygems')
-rw-r--r-- | lib/rubygems/installer.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 162a50fdb7..896f3b4f58 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -193,6 +193,13 @@ class Gem::Installer @gem_home = Gem.user_dir @bin_dir = Gem.bindir gem_home unless options[:bin_dir] @plugins_dir = Gem.plugindir(gem_home) + end + + if @gem_home == Gem.user_dir + # If we get here, then: + # 1. `--user-install` was specified, or + # 2. GEM_HOME was not writable, and `Gem::PathSupport` fell back to `Gem.user_dir`. + check_that_user_bin_dir_is_in_path end end |