Skip to content

Commit 9540b2b

Browse files
committed
Set BASE_DIR to sys path also
1 parent 97615cd commit 9540b2b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/dotenv/main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ def set_as_environment_variables(self):
9797
continue
9898
if v is not None:
9999
os.environ[to_env(k)] = to_env(v)
100+
if to_env(k) == 'BASE_DIR' and to_env(v) not in sys.path:
101+
logger.info('Append BASE_DIR to path.')
102+
sys.path.append(to_env(v))
100103

101104
return True
102105

0 commit comments

Comments
 (0)