fix(layout): handle submodule sections whose name differs from path
ci/woodpecker/push/eco Pipeline was successful
ci/woodpecker/push/eco Pipeline was successful
The duplicate-settings guard compared the section field dict with a set and could raise TypeError instead of reporting the real configuration error. Compare sets and add a fixture accepting a section name that differs from its path.
This commit is contained in:
1 parent
f08ec00dec
commit
7aac052149
2 files changed
+10
-1
No files matched your search
@@ -285,7 +285,7 @@ def check_submodules(config, active, depth, label, urls):
|
||||
for name, fields in sections.items():
|
||||
require(set(fields) == {"path", "url"},
|
||||
f"{label}: unexpected submodule settings: "
|
||||
f"{sorted(f'submodule.{name}.{field}' for field in fields ^ {'path', 'url'})}")
|
||||
f"{sorted(f'submodule.{name}.{field}' for field in set(fields) ^ {'path', 'url'})}")
|
||||
path = fields["path"]
|
||||
require(path not in by_path, f"{label}: duplicate submodule path: {path}")
|
||||
by_path[path] = fields["url"]
|
||||
|
||||
Reference in new issue
Block a user