PR feedback adressed
This commit is contained in:
parent
6c4016af46
commit
db3bc28937
4 changed files with 10 additions and 15 deletions
|
@ -1,7 +1,7 @@
|
|||
{EventEmitter} = require 'events'
|
||||
SquirrelUpdate = require './auto-updater/squirrel-update-win'
|
||||
app = require('app')
|
||||
url = require('url')
|
||||
app = require 'app'
|
||||
url = require 'url'
|
||||
|
||||
class AutoUpdater extends EventEmitter
|
||||
|
||||
|
@ -12,14 +12,7 @@ class AutoUpdater extends EventEmitter
|
|||
setFeedUrl: (updateUrl) ->
|
||||
# set feed URL only when it hasn't been set before
|
||||
unless @updateUrl
|
||||
# See https://github.com/Squirrel/Squirrel.Windows/issues/132
|
||||
# This way the Mac and Windows Update URL can be the same, even when
|
||||
# the Mac version is sending additional data in the query string.
|
||||
parsedUrl = url.parse(updateUrl)
|
||||
delete parsedUrl.search
|
||||
delete parsedUrl.query
|
||||
|
||||
@updateUrl = url.format(parsedUrl)
|
||||
@updateUrl = updateUrl
|
||||
|
||||
checkForUpdates: ->
|
||||
throw new Error('Update URL is not set') unless @updateUrl
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue