From 92ed2d189e26d73661d399271991d2cf16c2e838 Mon Sep 17 00:00:00 2001 From: Patrick Reynolds Date: Wed, 9 Dec 2015 23:24:32 -0600 Subject: [PATCH] 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. --- bin/git-linguist | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/git-linguist b/bin/git-linguist index 9541cf82..37d46b64 100755 --- a/bin/git-linguist +++ b/bin/git-linguist @@ -50,6 +50,7 @@ class GitLinguist def clear_language_stats File.unlink(cache_file) + rescue Errno::ENOENT end def disable_language_stats