File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,20 @@ async function main() {
5454 const restored = await cache . restoreCache ( cachePaths , cacheKey ) ;
5555 const ret = await exec . exec ( 'pre-commit' , args , { ignoreReturnCode : push } ) ;
5656 if ( ! restored ) {
57- await cache . saveCache ( cachePaths , cacheKey ) ;
57+ try {
58+ await cache . saveCache ( cachePaths , cacheKey ) ;
59+ } catch ( e ) {
60+ core . warning (
61+ `There was an error saving the pre-commit environments to cache:
62+
63+ ${ e . message || e }
64+
65+ This only has performance implications and won't change the result of your pre-commit tests.
66+ If this problem persists on your default branch, you can try to fix it by editing your '.pre-commit-config.yaml'.
67+ For example try to run 'pre-commit autoupdate' or simply add a blank line.
68+ This will result in a different hash value and thus a different cache target.` . replace ( / ^ + / gm, '' )
69+ ) ;
70+ }
5871 }
5972
6073 if ( ret && push ) {
You can’t perform that action at this time.
0 commit comments