Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Auto merge of #6645 - bundler:colby/require-etc, r=colby-swandale
Browse files Browse the repository at this point in the history
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 5dcfc31)
  • Loading branch information
bundlerbot authored and colby-swandale committed Aug 16, 2018
1 parent 4beb443 commit da0e5e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/bundler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ def user_home
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
Expand Down

0 comments on commit da0e5e9

Please sign in to comment.