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

Fix cross-device link error when running self-update on Linux #63

Merged
merged 2 commits into from
Aug 9, 2024

Conversation

paradoxuum
Copy link
Contributor

@paradoxuum paradoxuum commented Aug 7, 2024

/tmp is often located on a different partition than /home on Linux systems, causing an error when moving the existing binary to a temporary file.

This change removes the existing Rokit binary on Linux systems. This is safe to do as the binary will be unlinked after the process ends, but is still removed from the directory structure, allowing a new file with the same path to be written to.

Closes #57

Copy link
Collaborator

@filiptibell filiptibell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! The changes look good to me, thanks for adding the code comment as well. One minor thing - let's use cfg!(target_os = "linux") so that we don't include macOS users in this change.

@filiptibell filiptibell merged commit 5ef1fc4 into rojo-rbx:main Aug 9, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

self-update fails while linking due to cross-device link error
2 participants