summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2015-12-29 17:24:52 +0800
committerSamuel Giddins <segiddins@segiddins.me>2016-01-25 10:49:51 -0600
commitaa4de7629340fa701a301ad9f3d6f82899c22684 (patch)
tree395809867d6400f978604b56d78c74b1d396d7bc
parentc0c849a87b8ccff62ee1a3d42e308ca2bc71ced1 (diff)
downloadbundler-aa4de7629340fa701a301ad9f3d6f82899c22684.tar.gz
unify global config and compact index cache dirs
-rw-r--r--lib/bundler.rb2
-rw-r--r--lib/bundler/settings.rb7
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb
index bfc94b21f2..346310cd27 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -137,7 +137,7 @@ module Bundler
end
def user_bundle_path
- Pathname.new(Bundler.rubygems.user_home).join(".bundler")
+ Pathname.new(Bundler.rubygems.user_home).join(".bundle")
end
def home
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index 05208379c6..31f1fdd7f2 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -209,8 +209,11 @@ module Bundler
end
def global_config_file
- file = ENV["BUNDLE_CONFIG"] || File.join(Bundler.rubygems.user_home, ".bundle/config")
- Pathname.new(file)
+ if ENV["BUNDLE_CONFIG"] && !ENV["BUNDLE_CONFIG"].empty?
+ Pathname.new(ENV["BUNDLE_CONFIG"])
+ else
+ Bundler.user_bundle_path.join("config")
+ end
end
def local_config_file