From 0375779c58e533fa187b6b94e6e2a8e251c8a3f4 Mon Sep 17 00:00:00 2001 From: Hironsan Date: Wed, 14 Dec 2022 15:17:52 +0900 Subject: [PATCH] Avoid to read env file if it is not a file --- backend/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/cli.py b/backend/cli.py index d531c64c..cb5df61b 100644 --- a/backend/cli.py +++ b/backend/cli.py @@ -170,7 +170,7 @@ def main(): # Dispatch handler. args = parser.parse_args() - if hasattr(args, "env_file"): + if hasattr(args, "env_file") and Path(args.env_file).is_file(): env.read_env(args.env_file, recurse=False, override=True) if hasattr(args, "handler"): django.setup()