[AsarUpdate] Check downloaded asar isn't XML error from GH api
This commit is contained in:
parent
567f7dd61e
commit
308f402c03
|
@ -18,7 +18,7 @@ const getAsarHash = () => crypto.createHash('sha512').update(fs.readFileSync(asa
|
||||||
module.exports = async () => { // (Try) update asar
|
module.exports = async () => { // (Try) update asar
|
||||||
log('AsarUpdate', 'Updating...');
|
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];
|
const asarUrl = downloadUrls[channel];
|
||||||
|
|
||||||
|
@ -50,10 +50,7 @@ module.exports = async () => { // (Try) update asar
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!downloadSuccess) {
|
if (!downloadSuccess || fs.readFileSync(downloadPath, 'utf8').startsWith('<Error>')) return log('AsarUpdate', 'Download error');
|
||||||
log('AsarUpdate', 'Download error');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const copySuccess = await new Promise((res) => {
|
const copySuccess = await new Promise((res) => {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue