-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENV["HOME"] default may throw fatal NoMethodError on *NIX #8
Comments
Thank you for the report pilcrow Can you propose a patch? Right now the system defines HOME to be able to expand and locate inputrc and history files in the user home directory. Regards. |
Perhaps |
@rdp - I think that Kind of thinking out loud - perhaps we could print something to STDERR if rb-readline tries to tilde expand without |
I just ran into this issue myself while running a rake task through god on Ubuntu. I set Not to nitpick, but a raised error when the ENV["HOME"] var is empty would help. |
I also got this problem:
|
If I don't have ENV['HOME'] set, it's a pretty good bet that I don't care about history or inputrc. I'd propose:
which would defer whatever evils may come from not having a home directory until later. If that might cause Evil, follow it up with:
Yes, I just spent a day trying to figure out a deployment issue that stemmed from this, too. |
I've left this open, as I would like to see us not require these variables at all. However, this is a definite improvement - thanks, @njvack :)! |
Our calls to `bundle exec` in the omnibus install need to have a HOME set because of an updated rb-readline that requires it.[1] This is related to 28345e92, where a HOME was added to the runit startup scripts for rails and sidekiq. This is the only other `bundle exec` in the omnibus cookbook and so it needs a HOME, too. [1] ConnorAtherton/rb-readline#8 Signed-off-by: Robb Kidd <rkidd@chef.io>
I am also having issues when deploying a Rails 5 app to AWS using elastic beanstalk, I get the following output in the logs:
|
The default catenation of two (Windows-specific?) ENV vars on line 1089 of
rbreadline.rb
results in a fatalNoMethodError
(NilClass +) on a *NIX system if $HOME is not set. Further, even if it were to succeed, the library has now modified a process-level attribute, and the new ENV var will be inherited by any children spawned by the rb-readline-require'ing script.While $HOME-less environments aren't common in *NIX, they do occur, and
rb-readline
should not give a fatal error nor permanently muck with the environment when they do.The text was updated successfully, but these errors were encountered: