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

Self-update in parallel processes does not work properly #53

Open
alexey-igrychev opened this issue Sep 6, 2021 · 0 comments
Open

Self-update in parallel processes does not work properly #53

alexey-igrychev opened this issue Sep 6, 2021 · 0 comments

Comments

@alexey-igrychev
Copy link

alexey-igrychev commented Sep 6, 2021

Currently, the library does not resolve possible conflicts when performing a self-update in parallel processes (and probably should not). The user might face the following errors:

# unix: attempt to update current program path that points to non-existent file after the parallel self-update
Error: rename /home/user/go/bin/.binary.old /home/user/go/bin/..binary.old.old: no such file or directory

# windows: attempt to replace the real current binary file (.binary.exe.old) with the result binary file (binary.exe) from the parallel self-update
Error: rename C:\Users\user\go\bin\binary.exe C:\Users\user\go\bin\.binary.exe.old: Access is denied.

To avoid such issues, locking together with a delay between updates can be used (example here).

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

No branches or pull requests

1 participant