summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-07-09 23:38:34 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-07-31 21:07:19 +0900
commitebf008b9aea71fdf9be8dcc92faae1c024201bf9 (patch)
tree2c85c3299cf9cd7ae48addf5099bad692baee827 /lib
parent6c71033ac3933cb23d9ee651ce864e164bc9b56f (diff)
[rubygems/rubygems] Install plugins to user directory
Fixes the `Gem::FilePermissionError` without the privilege. Initialize `@plugins_dir` to the user gem directory, when installing with `--user` option. https://github.com/rubygems/rubygems/commit/21a71ac769
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3379
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems/installer.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index 0639672137..33171a8eb9 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -184,6 +184,7 @@ class Gem::Installer
if options[:user_install]
@gem_home = Gem.user_dir
@bin_dir = Gem.bindir gem_home unless options[:bin_dir]
+ @plugins_dir = Gem.plugindir(gem_home)
check_that_user_bin_dir_is_in_path
end
end