skip cache directory error when empty
This commit is contained in:
@@ -83,6 +83,7 @@ module.exports = OutputCacheManager =
|
|||||||
# look in compileDir for build dirs and delete if > N or age of mod time > T
|
# look in compileDir for build dirs and delete if > N or age of mod time > T
|
||||||
fs.readdir cacheRoot, (err, results) ->
|
fs.readdir cacheRoot, (err, results) ->
|
||||||
if err?
|
if err?
|
||||||
|
return callback(null) if err.code == 'ENOENT' # cache directory is empty
|
||||||
logger.error err: err, project_id: cacheRoot, "error clearing cache"
|
logger.error err: err, project_id: cacheRoot, "error clearing cache"
|
||||||
return callback(err)
|
return callback(err)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user