     @child = child_process.spawn(
       '/bin/sh',
       [ '-c', [cmd.exec].concat(args).join(' ') ],
-      { cwd : @root, env: env }
+      { cwd : @replace cmd.cwd, env: env }
     )
 
     @child.stdout.on 'data', @buildView.append

      realAtomBuild = fs.realpathSync @root + '/.atom-build.json'
      delete require.cache[realAtomBuild]
      build = require realAtomBuild
      [exec, env, args] = [ build.cmd, build.env, build.args ]

    if !exec && fs.existsSync @root + '/package.json'
      realPackage = fs.realpathSync @root + '/package.json'

child_process = require 'child_process'
fs = require 'fs'
path = require 'path'
qs = require 'querystring'
_ = require 'underscore'

