             spawnOpts: @spawnOpts(cabalRoot)
             buildDir: @getConfigOpt('buildDir')
           }
-          @cabalProcess = buildf args
+          buildf args
         else
           throw new Error("Unkown builder '#{builder?.name ? builder}'")
       else
-        @cabalFileError()
-    .catch (error) ->
+        @upi.addMessages [
+          message: 'No cabal file found'
+          severity: 'error'
+        ]
+        return {}
+    .then (res) =>
+      @running = false
+      return res
+    .catch (error) =>
+      @running = false
       if error?
+        console.error error
         atom.notifications.addFatalError error.toString(),
           detail: error
           dismissable: true
-      opts.onDone?()
+      return {}
 
   builders:
-    none: ({opts}) -> opts.onDone(0, false)
+    none: ({opts}) -> return {exitCode: 0, hasError: false}
     cabal: ({cmd, opts, target, cabalRoot, spawnOpts, buildDir}) ->
       cabalArgs = [cmd]
       switch cmd

  cabalBuild: (cmd, opts) =>
    # It shouldn't be possible to call this function until cabalProcess
    # exits. Otherwise, problems will ensue.
    return opts.onDone?() if @cabalProcess?.running

    Promise.all [@upi.getConfigParam('builder'), @upi.getConfigParam('target')]
    .then ([builder, target]) =>

      messageTypes: ['build']
      defaultSeverity: 'build'
      canCancel: true
