Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Fix crash with update check on Linux
Browse files Browse the repository at this point in the history
Fix #3907

Auditors: @aekeus

Test Plan: Open the browser and wait 3 minutes.  Check updateLog.log and it should have a message about not scheduling updates
  • Loading branch information
bbondy committed Sep 12, 2016
1 parent 47bf893 commit dcc4a8f
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions app/updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,18 @@ exports.init = (platform, arch, ver) => {
version = ver

var baseUrl = exports.updateUrl(appConfig.updates, platform, arch)
debug(`updateUrl = ${baseUrl}`)

scheduleUpdates()

// This will fail if we are in dev
try {
autoUpdater.setFeedURL(baseUrl)
} catch (err) {
console.log(err)
if (baseUrl) {
debug(`updateUrl = ${baseUrl}`)
scheduleUpdates()
// This will fail if we are in dev
try {
autoUpdater.setFeedURL(baseUrl)
} catch (err) {
console.log(err)
}
} else {
debug('No updateUrl, not scheduling updates.')
}
}

Expand Down

1 comment on commit dcc4a8f

@aekeus
Copy link
Member

@aekeus aekeus commented on dcc4a8f Sep 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ lgtm

Please sign in to comment.