summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--static/js/web-install.js7
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) => {