From a3dce77e4345c47d3a50c34d6f3a63e830b74591 Mon Sep 17 00:00:00 2001 From: Tobias Holler Date: Wed, 24 Jan 2024 17:03:08 +0100 Subject: [PATCH] ZMS-1901: fix ./cli modules reference-libraries --- cli | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/cli b/cli index ed09b4ddb..4f20fba07 100755 --- a/cli +++ b/cli @@ -55,15 +55,14 @@ def cli_modules_reference_libraries(no_symlink: bool): with open(composer_file_path, "r") as f: composer_content = json.load(f) - composer_content["repositories"] = composer_content.get("repositories", []) - if len(list(filter(lambda x: x.get("url") == "../*", composer_content["repositories"]))) == 0: - composer_content["repositories"].append({ - "type": "path", - "url": "../*", - "options": { - "symlink": not no_symlink - } - }) + composer_content["repositories"] = list([i for i in composer_content.get("repositories", []) if i.get("type") != "path" and i.get("url", None) != "../*"]) + composer_content["repositories"].append({ + "type": "path", + "url": "../*", + "options": { + "symlink": not no_symlink + } + }) require = composer_content.get("require", []) for dependency_key in require: