Skip to content

Commit a421faf

Browse files
committed
opp_env: topological sort in "list --expand" output
1 parent cc4546c commit a421faf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: opp_env/opp_env.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1698,13 +1698,13 @@ def move_to_front(list, name):
16981698
print(f"{name.ljust(name_width)} {cyan(description)}")
16991699
elif list_mode == "expand":
17001700
for project in projects:
1701-
expanded = project_registry.expand_dependencies([project])
1701+
expanded = sort_by_project_dependencies(project_registry.expand_dependencies([project]))
17021702
print(' '.join([p.get_full_name() for p in expanded]))
17031703
elif list_mode == "expand-all":
17041704
for project in projects:
17051705
combinations_list = project_registry.expand_dependencies([project], return_all=True)
17061706
for combination in combinations_list:
1707-
print(' '.join([p.get_full_name() for p in combination]))
1707+
print(' '.join([p.get_full_name() for p in sort_by_project_dependencies(combination)]))
17081708
else:
17091709
raise Exception(f"invalid list mode '{list_mode}'")
17101710

0 commit comments

Comments
 (0)