Skip to content

Commit aa2b766

Browse files
authored
Update the reload excludes for CLI run (#709)
1 parent 099880d commit aa2b766

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

backend/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import os
55

66
from dataclasses import dataclass
7+
from pathlib import Path
78
from typing import Annotated
89

910
import cappa
@@ -39,7 +40,7 @@ def run(host: str, port: int, reload: bool, workers: int | None) -> None:
3940
host=host,
4041
port=port,
4142
reload=not reload,
42-
reload_excludes=[os.path.abspath('../.venv' if 'backend' in os.getcwd() else '.venv')],
43+
reload_excludes=[os.path.abspath('.venv' if Path(Path.cwd() / '.venv').is_dir() else '../.venv')],
4344
workers=workers,
4445
)
4546

0 commit comments

Comments
 (0)