aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/gem_helper.rb
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-09-06 14:22:29 -0400
committerSamuel Giddins <segiddins@segiddins.me>2016-09-07 14:22:08 +0200
commit02e7f67727b45f59ec0aec4df410e05921d94928 (patch)
tree37f4a195c9b29e9c6bfdd1a1812ca0f3bf9b048b /lib/bundler/gem_helper.rb
parent002939bbba581d38ba788016f893a79bca87f855 (diff)
downloadbundler-02e7f67727b45f59ec0aec4df410e05921d94928.tar.gz
Fallback to a temp dir when the home directory is not usable
Diffstat (limited to 'lib/bundler/gem_helper.rb')
-rw-r--r--lib/bundler/gem_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb
index fdb2db7d..73cbf9e0 100644
--- a/lib/bundler/gem_helper.rb
+++ b/lib/bundler/gem_helper.rb
@@ -98,7 +98,7 @@ module Bundler
allowed_push_host = @gemspec.metadata["allowed_push_host"]
gem_command += " --host #{allowed_push_host}" if allowed_push_host
end
- unless allowed_push_host || Pathname.new("~/.gem/credentials").expand_path.file?
+ unless allowed_push_host || Bundler.user_home.join(".gem/credentials").file?
raise "Your rubygems.org credentials aren't set. Run `gem push` to set them."
end
sh(gem_command)