diff --git a/xexe/cli.py b/xexe/cli.py index c090212..f3fd0a2 100644 --- a/xexe/cli.py +++ b/xexe/cli.py @@ -16,7 +16,7 @@ logging.basicConfig( logger = logging.getLogger() -load_dotenv() +load_dotenv(dotenv_path=PATHS.dot_env_file_path, verbose=True) @click.group() diff --git a/xexe/constants.py b/xexe/constants.py index 78f03f0..9c73e49 100644 --- a/xexe/constants.py +++ b/xexe/constants.py @@ -5,3 +5,6 @@ from dataclasses import dataclass @dataclass class PATHS: logging_file: pathlib.Path = pathlib.Path("xexe.log") + # Expand user is important. It will replace the user and give you the full + # path. Stuff breaks without it. + dot_env_file_path: pathlib.Path = pathlib.Path("~/.xexe/.env").expanduser()