Skip to content
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

juliaup doesn't correctly resolve symlinks when self updating on macOS #885

Open
ghyatzo opened this issue Apr 5, 2024 · 0 comments · May be fixed by #886
Open

juliaup doesn't correctly resolve symlinks when self updating on macOS #885

ghyatzo opened this issue Apr 5, 2024 · 0 comments · May be fixed by #886

Comments

@ghyatzo
Copy link
Contributor

ghyatzo commented Apr 5, 2024

Hello,

installing juliaup through the sh script, and then symlinking the juliaup binary breaks correct autoreferentiality of the executable. let my_own_path = std::env::current_exe() does not follow symlinks (at least on macOS).

running juliaup self update incurs in

Error: Failed to update versions db.

Caused by:
    0: `run_command_update_version_db` command failed to load configuration db.
    1: Failed to open juliaup config file.
    2: No such file or directory (os error 2)

running juliaup self uninstall will fail to correctly remove the paths.juliaupselfhome folder since it will point to two parent folders with respect to the symlink location instead of the true executable.

with the patched source (added some code to show the difference in the info command):

$ ./juliaup info     <-- invoking the symlink
TEST:: current_exe: /Users/<user>/projects/juliaup_dev/juliaup   <-- symlinked to the build output in target/debug
TEST:: canonicalised_exe: /Users/<user>/projects/juliaup_dev/target/debug/juliaup 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant