From 6f9f09981ce956ac258f6dbf1ab61819b4b54cbb Mon Sep 17 00:00:00 2001 From: alex2awesome Date: Tue, 5 Sep 2023 12:14:33 -0700 Subject: [PATCH] Update __init__.py Allow for flexible path setting --- retriv/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/retriv/__init__.py b/retriv/__init__.py index 9cd61cd..af27bdd 100755 --- a/retriv/__init__.py +++ b/retriv/__init__.py @@ -21,8 +21,8 @@ # Set environment variables ---------------------------------------------------- os.environ["TOKENIZERS_PARALLELISM"] = "false" -os.environ["RETRIV_BASE_PATH"] = str(Path.home() / ".retriv") - +if "RETRIV_BASE_PATH" not in os.environ: # allow user to set a different path in .bash_profile + os.environ["RETRIV_BASE_PATH"] = str(Path.home() / ".retriv") def set_base_path(path: str): os.environ["RETRIV_BASE_PATH"] = path