 
     @flowPath = path.join(@flowPath, 'flow')
 
-    flowServer = spawn(@flowPath, ['start', '--all', '--module', 'node', path.resolve(atom.project.path)])
-    flowServer.on 'close', (code) => @flowEnabled &= (code is 0)
+    flowServer = spawn(@flowPath, ['start', '--all', '--module', 'node', path.resolve(atom.project.getPath())])
+    flowServer.on 'close', (code) => @flowEnabled &= (code is 2)
 
   destroy: ->
-    spawn(@flowPath, ['--stop', path.resolve(atom.project.path)])
+    spawn(@flowPath, ['--stop', path.resolve(atom.project.getPath())])
     console.log "die"
 
 module.exports = LinterFlow

linterPath = atom.packages.getLoadedPackage('linter').path
Linter = require "#{linterPath}/lib/linter"
findFile = require "#{linterPath}/lib/util"

path = require "path"
fs = require 'fs'

    @flowPath = @findFlowInPath()

    @flowEnabled = true
    @flowEnabled &= atom.project.getPath() and fs.existsSync(atom.project.getPath())
    @flowEnabled &= fs.existsSync(path.join(atom.project.getPath(), '.flowconfig'))
    @flowEnabled &= @flowPath?

    unless @flowEnabled
