Skip to content

Commit 9c80bfe

Browse files
Fix bug
1 parent 81fb679 commit 9c80bfe

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/seclab_taskflow_agent/path_utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ def log_dir() -> Path:
4040
str: The path to the log directory.
4141
"""
4242
p = os.getenv("LOG_DIR")
43-
if p:
44-
return Path(p)
45-
return platformdirs.user_log_dir(appname="seclab-taskflow-agent",
46-
appauthor="GitHubSecurityLab",
47-
ensure_exists=True)
43+
if not p:
44+
p = platformdirs.user_log_dir(appname="seclab-taskflow-agent",
45+
appauthor="GitHubSecurityLab",
46+
ensure_exists=True)
47+
return Path(p)
4848

4949
def log_file(filename: str) -> Path:
5050
"""

0 commit comments

Comments
 (0)