diff --git a/lib/cache.js b/lib/cache.js index 20be221e1..8ed6a0d7a 100644 --- a/lib/cache.js +++ b/lib/cache.js @@ -39,8 +39,11 @@ var Cache = Object.derive(function(path, dir) { deps: this.deps, info: info }; - fis.util.write(this.cacheInfo, JSON.stringify(infos)); - fis.util.write(this.cacheFile, content); + + if (content) { + fis.util.write(this.cacheInfo, JSON.stringify(infos)); + fis.util.write(this.cacheFile, content); + } }, /**