Dir.home returns LOGDIR env var instead of HOME or user.home #1556

Closed
ledesma opened this Issue Mar 12, 2014 · 5 comments

Projects

None yet

3 participants

@ledesma
ledesma commented Mar 12, 2014

While searching for the reason why net/ssh didn't pick up my keys from my home folder, I noticed that Dir.home is pointing to the path defined in the LOGDIR evn variable.

In org.jruby.Rubydir.getHomeDirectoryPath() the order is

  1. LOGDIR
  2. HOME
  3. user.home

According to JRUBY-6295 in Jira it should be

  1. HOME
  2. user.home
  3. LOGDIR

(which makes much more sense).

@lucasallan
Member

I will check it.

@lucasallan
Member

Fixed by 3a1961b
Thanks @ledesma.

@lucasallan lucasallan closed this Mar 14, 2014
@enebo
Member
enebo commented Mar 14, 2014

@lucasallan Should this be fixed on jruby-1_7 branch as well? Does this logic match 1.8.7 or 1.9.3 behavior? If so you should commit this on that branch as well.

@lucasallan
Member

You're right. I just pushed it to jruby-1_7.

@enebo
Member
enebo commented Mar 14, 2014

Thanks @lucasallan!

@enebo enebo added this to the JRuby 1.7.12 milestone Apr 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment