[AsarUpdate] Check downloaded asar isn't XML error from GH api
This commit is contained in:
parent
567f7dd61e
commit
308f402c03
1 changed files with 2 additions and 5 deletions
|
@ -18,7 +18,7 @@ const getAsarHash = () => crypto.createHash('sha512').update(fs.readFileSync(asa
|
|||
module.exports = async () => { // (Try) update asar
|
||||
log('AsarUpdate', 'Updating...');
|
||||
|
||||
if (!oaVersion.startsWith('nightly-')) return log('AsarUpdate', 'Non-standard version');
|
||||
// if (!oaVersion.startsWith('nightly-')) return log('AsarUpdate', 'Non-standard version');
|
||||
|
||||
const asarUrl = downloadUrls[channel];
|
||||
|
||||
|
@ -50,10 +50,7 @@ module.exports = async () => { // (Try) update asar
|
|||
});
|
||||
});
|
||||
|
||||
if (!downloadSuccess) {
|
||||
log('AsarUpdate', 'Download error');
|
||||
return;
|
||||
}
|
||||
if (!downloadSuccess || fs.readFileSync(downloadPath, 'utf8').startsWith('<Error>')) return log('AsarUpdate', 'Download error');
|
||||
|
||||
const copySuccess = await new Promise((res) => {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue