         description: 'This may take a few minutes. Please **do not** close the editor.'
         dismissable: true
 
+    localStorage.set('restartingForUpdate', true)
     @_updatePackage().then (pkgResult) =>
       @_installDependencies().then (depResult) =>
         log = "Learn IDE:\n#{pkgResult.log}"


      packagesToUpdate

  _getDependencies: ->
    @_getDependenciesFromPackagesDir().catch =>
      @_getDependenciesFromCurrentPackage()



        if code isnt 0
          waitNotification.dismiss()
          localStorage.delete('restartingForUpdate')
          @_updateFailed(log)
          return

        localStorage.set('updateLog', log)
        atom.restartApplication()

  didRestartAfterUpdate: ->
    log = localStorage.remove('updateLog')
    target = localStorage.remove('targetedUpdateVersion')

    if @_shouldUpdate(target) then @_updateFailed(log) else @_updateSucceeded()

  _fetchLatestVersionData: ->
    fetch(LATEST_VERSION_URL).then (@latestVersionData) =>
