@actions/exec loses errors thrown synchronously by spawn (e.g. EPERM on sandboxed runners), so the try/catch never fires and the post step exits before saving the cache. execFile passes them to the caller.