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

[#115] Allow self-updates on Windows #162

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

FrancisMurillo
Copy link
Contributor

@FrancisMurillo FrancisMurillo commented May 20, 2023

Allow self-updates on Windows by using self-replace crate.

I was able to test this by building a release from Linux to Windows and the self-update works. I would appreciate if somebody else can test this with a dedicated Windows setup since it would take me some time to setup Windows for Rust. Going to add a Windows CI test if I can.

One caveat with std::env::current_exe is that if the executable is a symbolic link, this may be confused with updating the target of the link or the link itself. Given that the executables are in the store_directory and that should be in PATH, the executables should not be a symbolic link so this should not be an issue. Still this may be an edge case.

Resolves #115

Additional tasks

  • Documentation for changes provided/changed
  • Tests added
  • Updated CHANGELOG.md

@FrancisMurillo FrancisMurillo force-pushed the feature/self-replace branch 28 times, most recently from 7070db9 to d1b1049 Compare May 20, 2023 14:21
@FrancisMurillo FrancisMurillo force-pushed the feature/self-replace branch 10 times, most recently from 8be045a to 053a513 Compare May 20, 2023 15:57
@FrancisMurillo FrancisMurillo force-pushed the feature/self-replace branch 14 times, most recently from 86f95a6 to 97ac93f Compare May 20, 2023 23:57
@FrancisMurillo
Copy link
Contributor Author

I think the Windows and Unix CI test is sufficient for testing the self-update so I think the PR is ready for review now.

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 under windows issues.
1 participant