mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-09-18 02:06:09 +08:00
Try pdiff if diff error
This commit is contained in:
19
lib/index.js
19
lib/index.js
@@ -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({
|
||||
|
Reference in New Issue
Block a user