fix: improve handling of CRAWL4_AI_BASE_DIRECTORY environment variable in setup.py
This commit is contained in:
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
|
# Create the .crawl4ai folder in the user's home directory if it doesn't exist
|
||||||
# If the folder already exists, remove the cache folder
|
# 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"
|
crawl4ai_folder = crawl4ai_folder / ".crawl4ai"
|
||||||
cache_folder = crawl4ai_folder / "cache"
|
cache_folder = crawl4ai_folder / "cache"
|
||||||
content_folders = [
|
content_folders = [
|
||||||
|
|||||||
Reference in New Issue
Block a user