Add initial compile cache spec

This commit is contained in:
Kevin Sawicki
2015-02-12 13:53:43 -08:00
parent 3f246035da
commit 20b2be51d9
3 changed files with 31 additions and 0 deletions

View File

@@ -7,6 +7,8 @@ to5 = require './6to5'
# package install so that the first package load in Atom doesn't have to
# compile anything.
exports.addPathToCache = (filePath, atomHome) ->
atomHome ?= process.env.ATOM_HOME
cacheDir = path.join(atomHome, 'compile-cache')
# Use separate compile cache when sudo'ing as root to avoid permission issues
if process.env.USER is 'root' and process.env.SUDO_USER and process.env.SUDO_USER isnt process.env.USER