summaryrefslogtreecommitdiff
path: root/lib/rubygems/command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/command.rb')
-rw-r--r--lib/rubygems/command.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/rubygems/command.rb b/lib/rubygems/command.rb
index 53bb609ae0..27aaf68db0 100644
--- a/lib/rubygems/command.rb
+++ b/lib/rubygems/command.rb
@@ -323,6 +323,10 @@ class Gem::Command
elsif @when_invoked
@when_invoked.call options
else
+ if Gem.paths.auto_user_install && !options[:install_dir] && !options[:user_install]
+ self.ui.say "Defaulting to user installation because default GEM_HOME (#{Gem.default_dir}) is not writable."
+ end
+
execute
end
ensure