mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 16:18:30 +00:00
fix db_storage_path handling to use env variable or cwd (#507)
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import appdirs
|
import appdirs
|
||||||
@@ -13,6 +14,11 @@ def db_storage_path():
|
|||||||
|
|
||||||
|
|
||||||
def get_project_directory_name():
|
def get_project_directory_name():
|
||||||
cwd = Path.cwd()
|
project_directory_name = os.environ.get("CREWAI_STORAGE_DIR")
|
||||||
project_directory_name = cwd.name
|
|
||||||
return project_directory_name
|
if project_directory_name:
|
||||||
|
return project_directory_name
|
||||||
|
else:
|
||||||
|
cwd = Path.cwd()
|
||||||
|
project_directory_name = cwd.name
|
||||||
|
return project_directory_name
|
||||||
|
|||||||
Reference in New Issue
Block a user