Skip to content

Commit d0fee8a

Browse files
committed
fix: handle None workspace in get_project_config to prevent TypeError
1 parent 78e9209 commit d0fee8a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gptme/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ def set_config_value(key: str, value: str) -> None: # pragma: no cover
128128

129129

130130
@lru_cache
131-
def get_project_config(workspace: Path) -> ProjectConfig | None:
131+
def get_project_config(workspace: Path | None) -> ProjectConfig | None:
132+
if workspace is None:
133+
return None
132134
project_config_paths = [
133135
p
134136
for p in (

0 commit comments

Comments
 (0)