From 0c152771fa363e75ad77bd7ab4aaca04e7f30b4d Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Sat, 17 Oct 2026 02:36:15 +0000 Subject: [PATCH] fix: handle FileNotFoundError in _get_file_fixes when files are missing on disk --- codecov_cli/services/upload/upload_collector.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/codecov_cli/services/upload/upload_collector.py b/codecov_cli/services/upload/upload_collector.py index 22310e2f4..02dc99390 100644 --- a/codecov_cli/services/upload/upload_collector.py +++ b/codecov_cli/services/upload/upload_collector.py @@ -145,6 +145,10 @@ def _get_file_fixes( ) except IsADirectoryError: logger.info(f"Skipping {filename}, found a directory not a file") + except FileNotFoundError: + logger.warning( + f"Skipping {filename}, file is tracked by git but was not found on disk; file fixes were not applied to this file." + ) return UploadCollectionResultFileFixer( path, fixed_lines_without_reason, fixed_lines_with_reason, eof