Catch ENOENT in clear_cache

There's no need for `clear_cache` to fail if the cache doesn't exist,
either because we call `clear_cache` twice or because no cache was
previously written on this particular repo.
This commit is contained in:
Patrick Reynolds
2015-12-09 23:24:32 -06:00
parent 7133c3b11a
commit 92ed2d189e

View File

@@ -50,6 +50,7 @@ class GitLinguist
def clear_language_stats
File.unlink(cache_file)
rescue Errno::ENOENT
end
def disable_language_stats