How to debug caching issue inside my action?

I’m creating an action that helps with installing tools written in Swift. One of the tools exits with 126 on macOS (both 10.15 and 11.0) after restoring. How can I debug this issue?
I already opened an issue 3 weeks ago but it got no attention:

Luckily the tool that has this issue is a linter, so the real world use case is to only use it on ‘ubuntu-latest’ as that is cheaper to do than run it on macOS and the output is the same.