Skip to content

Commit

Permalink
ZMS-1901: fix ./cli modules reference-libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasholler committed Jan 24, 2024
1 parent 3d4f076 commit a3dce77
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions cli
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a3dce77

Please sign in to comment.