Skip to content

Commit dc1224d

Browse files
Remove redundant path resolution and enable rmtree error handling (#183)
- Remove unnecessary _normalize_path(path.resolve()) calls, using path directly for ingestion - Remove ignore_errors=True from shutil.rmtree to allow proper error reporting
1 parent e997c4b commit dc1224d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/gitingest/query_ingestion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,6 @@ def run_ingest_query(query: ParsedQuery) -> Tuple[str, str, str]:
897897
raise ValueError(f"{query.slug} cannot be found")
898898

899899
if query.type and query.type == "blob":
900-
return _ingest_single_file(_normalize_path(path.resolve()), query)
900+
return _ingest_single_file(path, query)
901901

902-
return _ingest_directory(_normalize_path(path.resolve()), query)
902+
return _ingest_directory(path, query)

src/gitingest/repository_ingest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ async def ingest_async(
9696
# Clean up the temporary directory if it was created
9797
if parsed_query.url:
9898
# Clean up the temporary directory
99-
shutil.rmtree(TMP_BASE_PATH, ignore_errors=True)
99+
shutil.rmtree(TMP_BASE_PATH)
100100

101101

102102
def ingest(

0 commit comments

Comments
 (0)