-
Notifications
You must be signed in to change notification settings - Fork 864
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: added daemon functions to the auto-updater #1509
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (makes sense mentally); but leaving this as a ref #1385. Update: Also, I think checkForUpdates
is used somewhere in Tray so if the user is fast enough to call the function, it may break. I'd check that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, this should fix stopIpfs
call in:
However, note that auto update is the critical feature of Desktop app and must be extremely robust. Right now, afaik, if stopIpfs
throws, update does not happen.
To be on the safe side I'd tweak quit-and-install.js
and wrap that stopIpfs
call in try/catch/finally and put autoUpdater.quitAndInstall
in the finally block, so it is ALWAYS executed – even if unexpected error occurs during stopIpfs
, like we observe now, or in the future, when we refactor things around.
Thoughts?
feat: add error catching to the quit and install functionality
1b01b72
to
6332b53
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, @rafaelramalho19 feel free to merge & release
(I believe this is important enough to be shipped as patch release v0.11.4)
Fixes #1508, fixes #1496, fixes #1375
The problem was that the autoUpdater was trying to access the
stopIpfs
from the context (ctx
variable), but that would only be initialized with the functions aftersetupDaemon
has been executed.