Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Revert update on asar download fail
Browse files Browse the repository at this point in the history
  • Loading branch information
smartfrigde committed Feb 4, 2022
1 parent 57ff483 commit f5580db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Updater.nim
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ proc downloadUpdate(endpoint:string) =
writeFile("build_info.json", fetch(endpoint & "latest.json"))
except Exception as e:
echo("Failed to download the latest asar: ", e.msg)
moveFile("app.asar.old", "app.asar")
moveFile("build_info.json.old", "build_info.json")
quit(1)
echo ("Downloaded the latest asar. Checking checksums")
if (parseJson(readFile("build_info.json"))["md5"].getStr() == getMD5(readFile("app.asar"))):
Expand Down

0 comments on commit f5580db

Please sign in to comment.