Allow pre-parser to read the yaml, in case user wants to include env-file: option there

This commit is contained in:
Paul Gauthier 2024-06-22 14:01:01 -07:00
parent ecc21517ee
commit 95a4ed47e6
2 changed files with 19 additions and 3 deletions

View file

@ -281,7 +281,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
default_config_files.append(Path.home() / conf_fname) # homedir
default_config_files = list(map(str, default_config_files))
preparser = get_preparser(git_root)
preparser = get_preparser(default_config_files, git_root)
pre_args, _ = preparser.parse_known_args(argv)
# Load the .env file specified in the arguments