Fix Action fails if saving cache fails #53 by s-weigand · Pull Request #54 · pre-commit/action
Conversation
This should fix #53, but as said before, the problem itself is most likely due to corruped cache, which makes testing it quite hard.
Wrapped saving cache in try-catch block, so the action itself shouldn't fail, if the caching fails.
one change per patch please, some parts of this are acceptable others are not -- I'm also planning to scrap/rewrite this at some point so I'm not sure if changing it now is a good idea
Have been getting Error: reserveCache failed: Cache already exists somewhat frequently, so thanks for this PR. Just wanted to check in, since would be great to avoid failing tests from non-essential caching.
Didn't have that error again and forgot this PR 😅
From my side, it is ready if @asottile is fine with it.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
