-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
couldn't find HOME environment -- expanding `~' #2901
Comments
I think this call to https://github.com/bbatsov/rubocop/blob/master/lib/rubocop/config_loader.rb#L216 Here is some manual testing of % ruby -e 'p Dir.home'
"/Users/mgee"
% HOME=foo ruby -e 'p Dir.home'
"foo"
% env -i ruby -e 'p Dir.home'
-e:1:in `home': couldn't find HOME environment -- expanding `~' (ArgumentError)
from -e:1:in `<main>' Some occurrences of this problem would be avoided if that code to find a config file was made lazy, only getting to I suppose a more complete solution would be to guard that call dirs_to_search << Dir.home if ENV.key?('HOME') |
[Fix #2901] Account for no `ENV['HOME']`
I hate commenting on closed issues but, this is the closest post to my issue I am still seeing:
I've tried pointing to the rubocop found in shims ( |
I have error like some of error fixed with
if it didnt fixed continue ...
--- If rvm didnt work search and install it :-)
and after restarting my mac I fixed my problem with pod error :-) |
Running
bundle exec rubocop -D
on our jenkins build server I am presented with the following:I really don't understand why this would be a problem.
$HOME
directory?Just use whatever
.rubocop.yml
that you can in the current directory or above but please don't crash if there is no HOME configured.Does that make sense at all?
The text was updated successfully, but these errors were encountered: