1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-18 00:06:10 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Try pdiff if diff error

This commit is contained in:
sunnylqm
2021-06-19 13:01:07 +08:00
parent a02ca4fa71
commit 33641fcbef

View File

@@ -166,11 +166,20 @@ export async function downloadUpdate(options, eventListeners) {
}
if (options.diffUrl) {
logger('downloading diff');
await Pushy.downloadPatchFromPpk({
updateUrl: options.diffUrl,
hash: options.hash,
originHash: currentVersion,
});
try {
await Pushy.downloadPatchFromPpk({
updateUrl: options.diffUrl,
hash: options.hash,
originHash: currentVersion,
});
} catch (e) {
logger(e.message);
logger('diff error, try pdiff');
await Pushy.downloadPatchFromPackage({
updateUrl: options.pdiffUrl,
hash: options.hash,
});
}
} else if (options.pdiffUrl) {
logger('downloading pdiff');
await Pushy.downloadPatchFromPackage({