-
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
canonicalize the current_exe result when self updating, so that it works with symlinking. #886
Conversation
ca0fa47
to
b91a3b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it in general, but maybe the right strategy here would be to just store the path to the bin and the parent folder in the GlobalPaths
structure and then use that everywhere? That seems more consistent with the current design.
An Issue I encounter with that approach is that the Another issue is that that would require passing the
are all functions that would need to change signature for them to use the Now that I dig a bit more in depth, I noticed also some inconsistencies on how the program refers to its own bin folder: It would very much be convenient to standardise this, so that there is only one "authority" that tells us which is the bin folder.
Personally I think that the most robust option is using
But it could be breaking for some (probably only those using Unless I am missing something foundamental, I don't really see why we should ever have |
@davidanthoff bump? any news regarding my comment above and/or your version in #915 ? |
Refer to #915 |
Fixes #885,
It centralises the resolution of the self path into a single function. Consolidated all the locations which queried the self path to call that function for better maintainability and consistency.
this change could also help towards #844, giving better support to symlinks and therefore custom locations