Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Executing default update process handler, in case auto-update fails. #14605

Merged
merged 1 commit into from
Dec 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/extensions/default/AutoUpdate/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -486,12 +486,12 @@ define(function (require, exports, module) {

} else {
// Update not present for current platform
return;
return false;
}

if (!checksum || !downloadURL || !installerName) {
console.warn("AutoUpdate : asset information incorrect for the update");
return;
return false;
}

var updateParams = {
Expand Down
7 changes: 6 additions & 1 deletion src/utils/UpdateNotification.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,12 @@ define(function (require, exports, module) {
*/
function handleUpdateProcess(updates) {
var handler = _updateProcessHandler || _defaultUpdateProcessHandler;
handler(updates);
var success = handler(updates);
if (_updateProcessHandler && !success) {
// Give a chance to default handler in case
// the auot update mechanism has failed.
_defaultUpdateProcessHandler(updates);
}
}

/**
Expand Down