mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
🐎 Use fs.statSyncNoException in coffee-cache
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user