[Bug]: gempyor.shared_cli.parse_config_files
Raises ValueError
When Provided $CONFIG_PATH
As Argument
#389
Labels
bug
Defects or errors in the code.
config
Relating to configuration files or their framework.
gempyor
Concerns the Python core.
medium priority
Medium priority.
Label
bug, config, gempyor
Priority Label
medium priority
Describe the bug/issue
If the
$CONFIG_PATH
environment variable is set this is treated as a config file being passed via the-c
option and causes and error if the$CONFIG_PATH
is provided as an argument. Not exactly sure what the correct treatment is here, I don't think we just want to take the union of the two generically, but maybe carve out this special case where only one config file is provided and it's the same? Could also check the$CONFIG_PATH
env variable and if present in the arguments then remove from the options prior to thisValueError
? I think the later is more robust.To Reproduce
A bit contrived:
Although the same issue will appear when using
gempyor.shared_cli.parse_config_files
in other CLIs.Environment, if relevant
dev branch, Python 3.11.10, R version 4.3.3
The text was updated successfully, but these errors were encountered: