               return reject()
           process.stdin.write "unmap-file #{uri}#{EOL}"
       else
-        Promise.resolve()
+        Promise.resolve(res)
     .finally (res) ->
       process.stdout.resume()
       callback res ? []

        Promise.resolve()
    .then ->
      new Promise (resolve, reject) ->
        parseData = ->
          data = process.stdout.read()
          unless data?

    unless process
      debug "Failed. Falling back to ghc-mod"
      return @runModCmd {options, command, text, uri, args, callback}
    process.stdout.pause()
    Promise.prototype.finally = (callback) -> @then(callback, callback)
    Promise.resolve().then ->
