diff options
author | Ellen Marie Dash <[email protected]> | 2023-09-30 03:17:29 -0400 |
---|---|---|
committer | git <[email protected]> | 2023-10-11 19:07:29 +0000 |
commit | be32109d64be81e796d44880aab966aabb4ae294 (patch) | |
tree | 3657b2d21f6f4d7c71f85e392c7515931c9667af /lib/rubygems/path_support.rb | |
parent | 28a6c4a1ad4935e1a0af7904e17733555988b88a (diff) |
[rubygems/rubygems] Move "Defaulting to user installation ..." message, so `--install-dir` and `--user-install` can suppress it.
https://github.com/rubygems/rubygems/commit/6677fc6853
Diffstat (limited to 'lib/rubygems/path_support.rb')
-rw-r--r-- | lib/rubygems/path_support.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/rubygems/path_support.rb b/lib/rubygems/path_support.rb index 6ce66494ca..343670a801 100644 --- a/lib/rubygems/path_support.rb +++ b/lib/rubygems/path_support.rb @@ -19,6 +19,10 @@ class Gem::PathSupport attr_reader :spec_cache_dir # :nodoc: ## + # Whether or `Gem.paths.home` defaulted to a user install. + attr_reader :auto_user_install + + ## # # Constructor. Takes a single argument which is to be treated like a # hashtable, or defaults to ENV, the system environment. @@ -38,9 +42,8 @@ class Gem::PathSupport @home = normalize_home_dir(Gem.default_dir) else # If `GEM_HOME` is not set AND we can't use `Gem.default_dir`, - # default to a user installation and print a message about this. - puts "Defaulting to user installation because default GEM_HOME (#{Gem.default_dir}) is not writable." - + # default to a user installation and set `@auto_user_install`. + @auto_user_install = true @home = normalize_home_dir(Gem.user_dir) end |