-
Notifications
You must be signed in to change notification settings - Fork 90
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
Manage the installation folder path through env variable. #429
Conversation
…erwise fall back to old behaviour.
…to it upon startup (or home folder if not defined)
I left some comments at the end of #406, which maybe are easier and more robust ways to solve this. I think we should generally try to not introduce another env variable, at the end of the day that is another state that is stored somewhere that can get out of sync with the rest of the state and then we have to handle all the potential errors that can come about from that. |
Regarding the book keeping part I agree, that is why I also proposed to modify the installation script to only be controlled by the env variable (similar to how rustup handles things). That way you don't have to keep track if the user selects a different folder and juggle a possible dual state, where your env variable points somewhere but the internal state chosen by the user points somewhere else. You basically keep part of the state (the self referential one) outside the program. If a user has the need to specify a custom installation folder she can do so only through the env var, and It is mentioned during the installation script where you are presented the current installation configuration. |
Late reply, differente time zone here. The benefits of not relying on the The implemented changes don't really solve #406, since the real issue is the reference to EDIT: May I also point out that the extra env variable, is completely optional in this PR. If you don't want to set it up you can, and the program goes on with the default settings. So It is in practice a completely transparent PR. |
Ah, I had assumed that |
I too had assumed that it would not follow symlinks, but apparently, it is platform dependant also here. I am on Mac so in my case it doesn't follow the symlinks. Odd that in the documentation they don't specify what platform does what though. |
So maybe the right strategy would be to a) check whether the path returned by Or maybe there is just something similar to |
I found the following example to be working:
and with
The only annoying thing is that |
Even better, I found this which resolves symlinks. so we can just call the
and with this calling the symlinks prints the right executable. (At least on MacOs, don't have access to machines with other OSes to test) |
This started from #406.
While the install location of the various julia versions can be customised through the
JULIA_DEPOT_PATH
env var, the self installation folder was not, and instead the program relied on the current position of the running executable (or symlink to it).This PR introduces the env var
JULIAUP_SELF_HOME
which controls the paths to the juliaup binaries and selfconfiguration files.To avoid too much book keeping to manage an eventual custom location, I disabled the logic for letting the user type the location itself, and instead only rely on setting up the right env variable, similarly to how rustup does.