 
     progressCb = (state) -> @emit("download-progress", state)
 
-    await @_download_update downloadTarget,
+    await @_downloadUpdate downloadTarget,
       "#{@options.updateServer}/#{@options.remoteFilenameOSX}",
       progressCb, defer err
 


    @emit "download-finished"

    await @_extract_update downloadTarget, extractFolder, defer err
    if err?
      @emit "download-failed", err
      return
    await @_hide_original_mac appPath, @options.osxAppName, defer err
    if err?
      @emit "download-failed", err
      return
    await @_copy_update_mac @options.osxAppName,
     extractFolder, appPath, defer err
    if err?
      @emit "download-failed", err

    console.log @options

  installUpdate: ->
    this._installUpdateMac() if /^darwin/.test process.platform
    this._installUpdateWin() if /^win/.test process.platform
    this._installUpdateLinux() if /^linux/.test process.platform

  _installUpdateMac: ->
    execPath = process.execPath
    filePath = execPath.substr(0, execPath.lastIndexOf("\\"))
    appPath = path.normalize(execPath + "/../../../../../../..")
