File tree Expand file tree Collapse file tree
src/fastapi_cloud_cli/commands Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ def _should_exclude_entry(path: Path) -> bool:
6262 if path .suffix == ".pyc" :
6363 return True
6464
65+ if path .name == ".env" or path .name .startswith (".env." ):
66+ return True
67+
6568 return False
6669
6770
Original file line number Diff line number Diff line change 1919 Path (".venv" ),
2020 Path ("__pycache__" ),
2121 Path ("module.pyc" ),
22+ Path ("/project/.env" ),
23+ Path ("/project/.env.local" ),
24+ Path ("/project/.env.production" ),
25+ Path (".env" ),
26+ Path (".env.development" ),
2227 ],
2328)
2429def test_excludes_paths (path : Path ) -> None :
@@ -37,6 +42,8 @@ def test_excludes_paths(path: Path) -> None:
3742 Path ("/project/src/module.pyx" ), # similar to .pyc but different
3843 Path ("/project/config.json" ),
3944 Path ("/project/README.md" ),
45+ Path ("/project/.envrc" ), # not a .env file
46+ Path ("/project/env.py" ), # not a .env file
4047 ],
4148)
4249def test_includes_paths (path : Path ) -> None :
You can’t perform that action at this time.
0 commit comments