From 75ef0d6581a3d02e6f4cce96a39ba72a4964ebf3 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Mon, 2 Mar 2015 09:58:20 +0000 Subject: [PATCH] skip cache directory error when empty --- app/coffee/OutputCacheManager.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/app/coffee/OutputCacheManager.coffee b/app/coffee/OutputCacheManager.coffee index 50c5837..af4ce61 100644 --- a/app/coffee/OutputCacheManager.coffee +++ b/app/coffee/OutputCacheManager.coffee @@ -83,6 +83,7 @@ module.exports = OutputCacheManager = # look in compileDir for build dirs and delete if > N or age of mod time > T fs.readdir cacheRoot, (err, results) -> if err? + return callback(null) if err.code == 'ENOENT' # cache directory is empty logger.error err: err, project_id: cacheRoot, "error clearing cache" return callback(err)