diff options
author | Greg Werbin <spam@me.gregwerbin.com> | 2017-09-10 20:30:43 -0400 |
---|---|---|
committer | Greg Werbin <spam@me.gregwerbin.com> | 2017-09-10 20:49:25 -0400 |
commit | b241c53d1782745d694545000a7f4c251b243a1b (patch) | |
tree | f7008c29ae5d544979edfe248c7e9458c559eef0 /lib/bundler/plugin.rb | |
parent | 4897ee981aabff9b5483edbd42c1be7616183707 (diff) | |
download | bundler-b241c53d1782745d694545000a7f4c251b243a1b.tar.gz |
Allow the user to set alternative to ~/.bundle
Recognize new environment variables, with the following fallbacks:
$BUNDLE_USER_HOME -> $HOME/.bundle
$BUNDLE_USER_CACHE -> $BUNDLE_USER_HOME/cache
$BUNDLE_USER_CONFIG -> $BUNDLE_USER_HOME/config
$BUNDLE_USER_PLUGIN -> $BUNDLE_USER_HOME/plugin
TODOs:
- Error handling in Bundler.user_bundle_path when an invalid option is
passed
- Add tests (see https://github.com/bundler/bundler/pull/5787/commits/47fbe99387fea73fa652ad6692349b24cad6fe2e)
- Draft PR with reference to GitHub issue numbers (not linked here as
per contributing guidelines)
+ Issue: 4333
+ Pull request: 5787
Diffstat (limited to 'lib/bundler/plugin.rb')
-rw-r--r-- | lib/bundler/plugin.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bundler/plugin.rb b/lib/bundler/plugin.rb index 99c9a867b0..7db159c593 100644 --- a/lib/bundler/plugin.rb +++ b/lib/bundler/plugin.rb @@ -80,8 +80,8 @@ module Bundler # The directory root for all plugin related data # - # Points to root in app_config_path if ran in an app else points to the one - # in user_bundle_path + # If run in an app, points to local root, in app_config_path + # Otherwise, points to global root, in Bundler.user_bundle_path("plugin") def root @root ||= if SharedHelpers.in_bundle? local_root @@ -96,7 +96,7 @@ module Bundler # The global directory root for all plugin related data def global_root - Bundler.user_bundle_path.join("plugin") + Bundler.user_bundle_path("plugin") end # The cache directory for plugin stuffs |