diff options
| author | Joel Turkel <jturkel@salsify.com> | 2019-01-07 10:52:33 -0500 |
|---|---|---|
| committer | Joel Turkel <jturkel@salsify.com> | 2019-01-07 11:03:31 -0500 |
| commit | 8b0779a0719ee702c59e1d638cccc32d9a69767b (patch) | |
| tree | ce0865ffd83b5eae1f9bfd0bb4dcbe9f1dbf19d4 /lib | |
| parent | a63a39d738865665f714f179fe42dd10006da26d (diff) | |
| download | bundler-8b0779a0719ee702c59e1d638cccc32d9a69767b.tar.gz | |
Don't check for the existence of a writable home directory if BUNDLE_USER_HOME is set
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/bundler.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb index 137d916cc6..3115b931ec 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -198,19 +198,19 @@ module Bundler def user_bundle_path(dir = "home") env_var, fallback = case dir when "home" - ["BUNDLE_USER_HOME", Pathname.new(user_home).join(".bundle")] + ["BUNDLE_USER_HOME", proc { Pathname.new(user_home).join(".bundle") }] when "cache" - ["BUNDLE_USER_CACHE", user_bundle_path.join("cache")] + ["BUNDLE_USER_CACHE", proc { user_bundle_path.join("cache") }] when "config" - ["BUNDLE_USER_CONFIG", user_bundle_path.join("config")] + ["BUNDLE_USER_CONFIG", proc { user_bundle_path.join("config") }] when "plugin" - ["BUNDLE_USER_PLUGIN", user_bundle_path.join("plugin")] + ["BUNDLE_USER_PLUGIN", proc { user_bundle_path.join("plugin") }] else raise BundlerError, "Unknown user path requested: #{dir}" end # `fallback` will already be a Pathname, but Pathname.new() is # idempotent so it's OK - Pathname.new(ENV.fetch(env_var, fallback)) + Pathname.new(ENV.fetch(env_var, &fallback)) end def user_cache |
