Handle relative paths in module_defaults_dir
This now handles strings as well as sct_dicts with type=file that include relative paths. Signed-off-by: Petr Šabata <contyk@redhat.com>
This commit is contained in:
parent
0e7f770fb7
commit
b9523ff5b0
@ -151,6 +151,11 @@ def create_comps_repo(compose, arch):
|
||||
|
||||
def write_module_defaults(compose):
|
||||
scm_dict = compose.conf["module_defaults_dir"]
|
||||
if isinstance(scm_dict, dict):
|
||||
if scm_dict["scm"] == "file":
|
||||
scm_dict["dir"] = os.path.join(compose.config_dir, scm_dict["dir"])
|
||||
else:
|
||||
scm_dict = os.path.join(compose.config_dir, scm_dict)
|
||||
|
||||
with temp_dir(prefix="moduledefaults_") as tmp_dir:
|
||||
get_dir_from_scm(scm_dict, tmp_dir, logger=compose._logger)
|
||||
|
Loading…
Reference in New Issue
Block a user