Skip to content

Commit 9ee5dec

Browse files
committed
Fix: Windows git error.
1 parent cb1e84e commit 9ee5dec

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "readmeai"
7-
version = "0.4.03"
7+
version = "0.4.04"
88
description = "🚀 Generate beautiful README.md files from the terminal. Powered by OpenAI's GPT LLMs 💫"
99
authors = ["Eli <[email protected]>"]
1010
license = "MIT"

readmeai/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ async def md_agent(
6161
placeholder = config.md.default
6262
repository = config.git.repository
6363
llm = model.OpenAIHandler(config)
64+
temp_dir = None
6465

6566
try:
6667
temp_dir = await asyncio.to_thread(
@@ -119,6 +120,7 @@ async def md_agent(
119120
logger.error(f"Stacktrace: {traceback.format_exc()}")
120121
finally:
121122
await llm.close()
122-
await asyncio.to_thread(shutil.rmtree, temp_dir)
123+
if temp_dir:
124+
await asyncio.to_thread(shutil.rmtree, temp_dir)
123125

124126
logger.info("README-AI execution complete.")

0 commit comments

Comments
 (0)