     @getCurrentWindow().close()
 
   # Private:
-  exit: (status) -> app.exit(status)
+  exit: (status) ->
+    app = remote.require('app')
+    app.exit(status)
 
   # Public: Is the current window in development mode?
   inDevMode: ->

    else
      buttonLabels = Object.keys(buttons)

    chosen = dialog.showMessageBox @getCurrentWindow(),
      type: 'info'
      message: message

  showSaveDialogSync: (defaultPath) ->
    defaultPath ?= @project?.getPath()
    currentWindow = @getCurrentWindow()
    dialog = remote.require('dialog')
    dialog.showSaveDialog currentWindow, {title: 'Save File', defaultPath}

  # Public: Open the dev tools for the current window.
