mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-11-02 22:33:11 +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) {
|
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({
|
||||||
|
|||||||
Reference in New Issue
Block a user