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: self-update in parallel processes does not work properly #33

Merged

Conversation

alexey-igrychev
Copy link
Member

Add 30 seconds delay between updates due to there is no proper way to prevent the following possible errors during parallel updates:

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

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

Add 30 seconds delay between updates due to there is no proper way to prevent the following possible errors during parallel updates:
```
# unix: attempt to update current program path that points to non-existent file after the parallel self-update
Error: rename /home/user/go/bin/.trdl.old /home/user/go/bin/..trdl.old.old: no such file or directory

# windows: attempt to replace real current binary file (.trdl.exe.old) with the result binary file (trdl.exe) from the parallel self-update
Error: rename C:\Users\user\go\bin\trdl.exe C:\Users\user\go\bin\.trdl.exe.old: Access is denied.
```
@alexey-igrychev alexey-igrychev merged commit ed02fee into main Aug 20, 2021
@alexey-igrychev alexey-igrychev deleted the fix_parallel_self_update_does_not_work_properly branch August 20, 2021 16:58
alexey-igrychev added a commit that referenced this pull request Sep 1, 2021
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.

None yet

1 participant