         args = [path.join(installPath, 'setup/index.php'), '--installmode=new']
         stdout = (output) -> atom.notifications.add 'warning', output
         exit = (code) ->
-            dismiss("MODX Installation"))
+            dismiss("MODX Installation")
             atom.notifications.add 'success', 'Install finished.'
         process = new BufferedProcess({command, args, stdout, exit})
         process.onWillThrowError((error) ->

{$, TextEditorView, View} = require 'atom-space-pen-views'
{BufferedProcess} = require 'atom'
_ = require 'underscore-plus'
fs = require 'fs-plus'

        fs.existsSync(buildPath)

    showConfig: ->
        file = path.join(@getInstallPath(), 'setup/config.xml')
        atom.workspace
            .open(file, searchAllPanes: true)
            .done (textEditor) =>
                pane = atom.workspace.paneForURI(file)
                options = { copyActiveItem: true }
                pane.splitLeft options
                textEditor.destroy()
                @disposable = new CompositeDisposable
                @disposable.add pane.getActiveEditor().onDidSave => @installCLI()
                @disposable.add pane.getActiveEditor().onDidDestroy => @disposable.dispose()

    config: ->
        buildPath = path.join(@getInstallPath(), '_build/')
        buildConf = buildPath + 'build.config.php'
        buildProp = buildPath + 'build.properties.php'
        configPath = path.join(@getInstallPath(), 'setup/')
        config = configPath + 'config.xml'

        fs.copy(buildPath + 'build.config.sample.php', buildConf)
        fs.copy(buildPath + 'build.properties.sample.php', buildProp)
        fs.copy(configPath + 'config.dist.new.xml', config)

        @fixPermissions(@getInstallPath())
        @showConfig()

    fixPermissions: (installPath) ->
        if process.platform is 'linux' or 'darwin'
