Skip to content

Commit

Permalink
correctly handle the env when set
Browse files Browse the repository at this point in the history
  • Loading branch information
ChacheGS committed Apr 4, 2022
1 parent dc79359 commit a8d8ef1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dotenv_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def dotenv_flow(
if base_path is None:
use_cwd = True

env = env not in (..., None) or os.environ.get("PY_ENV", "")
if env in (..., None):
env = os.getenv("PY_ENV", "")

defaults = [".env.defaults", ".env"]
if env not in (..., None):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dotenv-flow"
version = "0.3.0"
version = "0.3.1"
description = "Like the dotenv-flow NodeJS library, for Python"
authors = ["Carlos Gonzalez <gonsa.carlos@gmail.com>"]
readme = "README.md"
Expand Down

0 comments on commit a8d8ef1

Please sign in to comment.