Browse Source
Merge pull request #2097 from doccano/enhancement/cli
Avoid to read env file if it is not a file
pull/2099/head
Hiroki Nakayama
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
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() |
|
|
|