diff options
| author | randomhydrosol <randomhydrosol@glassrom.org> | 2022-11-13 03:56:21 +0530 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2022-11-17 14:21:31 -0500 |
| commit | 135ebf512171641c9488c6fae2d3c45b3928343e (patch) | |
| tree | 3dfa57b8e070e879a8a17e62e83554512d63de4a /static/js/web-install.js | |
| parent | e0b8a09b736fa5b08cd814de3e3f2bb49effa0f5 (diff) | |
cancel snapshot update if one is in progress
Signed-off-by: randomhydrosol <randomhydrosol@glassrom.org>
Diffstat (limited to 'static/js/web-install.js')
| -rw-r--r-- | static/js/web-install.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/static/js/web-install.js b/static/js/web-install.js index 66df4314..4e598474 100644 --- a/static/js/web-install.js +++ b/static/js/web-install.js @@ -213,8 +213,13 @@ async function flashRelease(setProgress) { throw new Error("You need to download a release first!"); } - setProgress("Flashing release..."); safeToLeave = false; + + // If the user didn't follow the update instructions correctly + setProgress("Cancelling any update in progress..."); + await device.runCommand("snapshot-update:cancel"); + + setProgress("Flashing release..."); try { await device.flashFactoryZip(blob, true, reconnectCallback, (action, item, progress) => { |
