Skip to content

Commit

Permalink
fix db_storage_path handling to use env variable or cwd (#507)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelKocur committed May 2, 2024
1 parent 20a81af commit c30bd1a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/crewai/utilities/paths.py
@@ -1,3 +1,4 @@
import os
from pathlib import Path

import appdirs
Expand All @@ -13,6 +14,11 @@ def db_storage_path():


def get_project_directory_name():
cwd = Path.cwd()
project_directory_name = cwd.name
return project_directory_name
project_directory_name = os.environ.get("CREWAI_STORAGE_DIR")

if project_directory_name:
return project_directory_name
else:
cwd = Path.cwd()
project_directory_name = cwd.name
return project_directory_name

0 comments on commit c30bd1a

Please sign in to comment.