mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-11 13:02:25 +00:00
On Windows the update helper was started as soon as the download was ready, then waited one minute for the app to exit. An app that held unsaved work, or a user who did not close it, outlasted that wait; the helper then started the old exe again with no arguments, which opened a second window of the old version and installed nothing. - self_update::prepare_update does what update did but returns a Restart. On Windows the Restart records the release as installed and starts the helper; on macOS and Linux it does nothing, since the restart is already scheduled. update calls prepare_update and starts the Restart at once, so its callers see no change. - Updater starts the Restart when it returns Action::Close. If the helper can't start, the app stays open and the prompt shows the error. - The helper does not start any exe when the app is still running after its wait. A step that fails after the app exited still starts the old exe, as before.