       console.log 'streaming complete'
       fs.closeSync tmpFile.fd
       console.log 'running Ninja'
-      spawn ninjaProc, [ '-vf', tmpFile.name ], stdio: [ 'pipe',
-        process.stdout, process.stderr ]
+      spawn ninjaProc,
+        [ '-vf', tmpFile.name, '-C', base ],
+          stdio: [ 'pipe',process.stdout, process.stderr ]
 
 findMist = ()->
   curPath = process.cwd()


ninjaProc = process.env.NINJA || 'ninja'

runNinja = (ninja)->
  console.log 'platform:', os.platform()
  switch os.platform()
    when 'darwin' or 'linux'

  console.log '\n' ##
  console.log result ## XXX DEBUG
  console.log '\n' ##
  runNinja result, mistdir
catch e
  console.error 'mist:', e.toString()
  throw e # XXX DEBUG
