Handling env var updated.
This commit is contained in:
parent
403389e3fd
commit
bb89ddf6d8
@ -54,7 +54,8 @@ def load_env(file_path: str = '.env') -> None:
|
|||||||
# Skip lines without '='
|
# Skip lines without '='
|
||||||
if '=' not in line:
|
if '=' not in line:
|
||||||
continue
|
continue
|
||||||
# Split into key and value at the first '='
|
if line.startswith('export '):
|
||||||
|
line = line[7:]
|
||||||
key, value = line.split('=', 1)
|
key, value = line.split('=', 1)
|
||||||
# Set environment variable
|
# Set environment variable
|
||||||
os.environ[key.strip()] = value.strip()
|
os.environ[key.strip()] = value.strip()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user