fix: improve handling of CRAWL4_AI_BASE_DIRECTORY environment variable in setup.py
This commit is contained in:
parent
652d396a81
commit
7d81c17cca
3
setup.py
3
setup.py
@ -9,7 +9,8 @@ import asyncio
|
||||
|
||||
# Create the .crawl4ai folder in the user's home directory if it doesn't exist
|
||||
# If the folder already exists, remove the cache folder
|
||||
crawl4ai_folder = Path(os.getenv("CRAWL4_AI_BASE_DIRECTORY")) or Path.home()
|
||||
base_dir = os.getenv("CRAWL4_AI_BASE_DIRECTORY")
|
||||
crawl4ai_folder = Path(base_dir) if base_dir else Path.home()
|
||||
crawl4ai_folder = crawl4ai_folder / ".crawl4ai"
|
||||
cache_folder = crawl4ai_folder / "cache"
|
||||
content_folders = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user