feat(torrent_api): load env file in current dir and execution dir
Torrent API CI / build (push) Successful in 36s
Torrent API CI / test (push) Successful in 12s
Torrent API CI / lint (push) Successful in 7s
Torrent API CI / install (mediahost) (push) Successful in 2s
Torrent API CI / install (vivohost) (push) Successful in 2s
Torrent API CI / install (serverhost) (push) Successful in 3s
Torrent API CI / install (quiethost) (push) Successful in 8s

This commit is contained in:
Lucas Vivo committed 2026-11-23 12:28:30 +01:00
1 parent 5c1d9be81a
commit 1992a3dcd0
1 file changed
+4 -1
+4 -1
View File
@@ -1,12 +1,15 @@
#!/home/lucas/scripts/torrent_api/.venv/bin/python
import sys
from pathlib import Path
from dotenv import load_dotenv
from torrent_api.cli import main
load_dotenv(".env")
working_env = Path.cwd() / ".env"
execution_env = Path(__file__).resolve().parent / ".env"
load_dotenv(working_env if working_env.is_file() else execution_env)
if __name__ == "__main__":
sys.exit(main())