Skip to content
Browse files
fix: handle config file extension/overwriting more explicitly (#1251)
* handle config file extension/overwriting more explicitly

* fmt
  • Loading branch information
johanneskoester committed Nov 17, 2021
1 parent b571e09 commit d0a7bf243c5df204136fa1f14706aab793793c68
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
@@ -1239,7 +1239,9 @@ def get_argument_parser(profile=None):
"Specify or overwrite the config file of the workflow (see the docs). "
"Values specified in JSON or YAML format are available in the global config "
"dictionary inside the workflow. Multiple files overwrite each other in "
"the given order."
"the given order. Thereby missing keys in previous config files are extended by "
"following configfiles. Note that this order also includes a config file defined "
"in the workflow definition itself (which will come first)."
@@ -1238,10 +1238,23 @@ def configfile(self, fp):
"""Update the global config with data from the given file."""
global config
if not self.modifier.skip_configfile:
c =
update_config(config, c)
update_config(config, self.overwrite_config)
if os.path.exists(fp):
c =
update_config(config, c)
if self.overwrite_config:
"Config file {} is extended by additional config specified via the command line.".format(
update_config(config, self.overwrite_config)
elif not self.overwrite_configfiles:
raise WorkflowError(
"Workflow defines configfile {} but it is not present or accessible.".format(

def pepfile(self, path):
global pep

0 comments on commit d0a7bf2

Please sign in to comment.