make home work properly #12

Open
Raynes opened this Issue Dec 15, 2011 · 8 comments

Comments

Projects
None yet
2 participants
Owner

Raynes commented Dec 15, 2011

1b5e18e#commitcomment-796025

Blah. This can be fixed, but boy will it be ugly.

Owner

Raynes commented Dec 18, 2011

Bandaid on the wound. I made it so that the path expansion stuff is explicit. We really do need to fix home though (which would fix path expansion as a side effect).

xpe commented Jan 4, 2015

@Raynes Does this problem remain? Perhaps it would help to add a small number of examples to reproduce the problems? (I'm about to start digging into ~ expansion with Java interop, so I can lend another set of eyes.)

Owner

Raynes commented Jan 4, 2015

Yes. I'm not sure what I could add as an example. The problem is that fs doesn't actually know where ~<user> leads, because it doesn't necessarily have to be /home/<user>.

xpe commented Jan 5, 2015

@Raynes I don't see any examples. When I dig through the link above, I don't see a clear statement of the problem.

Now, at the risk of having no clarity on what the actual problem is, why is this hard? Why not just lookup the $HOME environment variable and convert ~ to it?

Owner

Raynes commented Jan 5, 2015

Please read the linked thread. The problem is clearly defined.

~<user>/foo

We don't currently have a way to tell where 's home directory actually is. $HOME is not remotely cross platform, let alone even reliably set in every environment. Not sure how much more I can explain :P

Owner

Raynes commented Jan 5, 2015

It's not necessarily hard either, I just haven't bothered.

xpe commented Jan 5, 2015

System.getProperty("user.home") works most of the time according to http://stackoverflow.com/questions/585534. Surely there is a respectable Java library that has already solved this?

Correction: System.getProperty("user.home") not $HOME.

Owner

Raynes commented Jan 5, 2015

Fantastic question. Is there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment