1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-11-02 22:33:11 +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) { if (options.diffUrl) {
logger('downloading diff'); logger('downloading diff');
await Pushy.downloadPatchFromPpk({ try {
updateUrl: options.diffUrl, await Pushy.downloadPatchFromPpk({
hash: options.hash, updateUrl: options.diffUrl,
originHash: currentVersion, 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) { } else if (options.pdiffUrl) {
logger('downloading pdiff'); logger('downloading pdiff');
await Pushy.downloadPatchFromPackage({ await Pushy.downloadPatchFromPackage({