summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThe Bundler Bot <bot@bundler.io>2018-07-31 21:55:08 +0000
committerColby Swandale <hello@colby.fyi>2018-08-16 21:42:28 +1000
commitda0e5e920fc82dd06b6a03f2736e5d1d2ba0a82f (patch)
tree8adb162708a3af0bb2306cd5a1ff3b8eacb094bf
parent4beb443862fe8bf85441f287813f6956ba6a7f8a (diff)
downloadbundler-da0e5e920fc82dd06b6a03f2736e5d1d2ba0a82f.tar.gz
Auto merge of #6645 - bundler:colby/require-etc, r=colby-swandale
require `etc` in Bundler#user_home ### What was the end-user problem that led to this PR? In some cases, we are sending messages to the`Etc` library which may not be loaded. ### What was your diagnosis of the problem? See #6640 ### What is your fix for the problem, implemented in this PR? Require the `etc` library before we use it Fixes #6640 (cherry picked from commit 5dcfc318f2f58d81875880533a65c8b58cda5622)
-rw-r--r--lib/bundler.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb
index 82182d30eb..bd6fe4d0bf 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -170,6 +170,7 @@ module Bundler
end
if warning
+ Kernel.send(:require, "etc")
user_home = tmp_home_path(Etc.getlogin, warning)
Bundler.ui.warn "#{warning}\nBundler will use `#{user_home}' as your home directory temporarily.\n"
user_home