diff --git a/src/coffee-cache.coffee b/src/coffee-cache.coffee index 6ccb4bcce..b51a7454b 100644 --- a/src/coffee-cache.coffee +++ b/src/coffee-cache.coffee @@ -15,8 +15,9 @@ getCachePath = (coffee) -> path.join(coffeeCacheDir, "#{digest}.coffee") getCachedJavaScript = (cachePath) -> - try - fs.readFileSync(cachePath, 'utf8') if fs.statSync(cachePath).isFile() + if stat = fs.statSyncNoException(cachePath) + try + fs.readFileSync(cachePath, 'utf8') if stat.isFile() compileCoffeeScript = (coffee, filePath, cachePath) -> js = CoffeeScript.compile(coffee, filename: filePath)