cancel snapshot update if one is in progress
Signed-off-by: randomhydrosol <randomhydrosol@glassrom.org>
This commit is contained in:
parent
e0b8a09b73
commit
135ebf5121
@ -213,8 +213,13 @@ async function flashRelease(setProgress) {
|
|||||||
throw new Error("You need to download a release first!");
|
throw new Error("You need to download a release first!");
|
||||||
}
|
}
|
||||||
|
|
||||||
setProgress("Flashing release...");
|
|
||||||
safeToLeave = false;
|
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 {
|
try {
|
||||||
await device.flashFactoryZip(blob, true, reconnectCallback,
|
await device.flashFactoryZip(blob, true, reconnectCallback,
|
||||||
(action, item, progress) => {
|
(action, item, progress) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user