From 22a8cb03cbbc164584d073f250bd12c66227308f Mon Sep 17 00:00:00 2001 From: Patrick Lipka Date: Sun, 25 Sep 2022 01:54:12 +0200 Subject: [PATCH] disable topological sort when unnecessary --- lib/sort.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/sort.py b/lib/sort.py index 042b2fa..da997fb 100644 --- a/lib/sort.py +++ b/lib/sort.py @@ -21,6 +21,10 @@ def topological_sort(source): def sort_libs_by_dependencies(selected_libs): + # no need for sorting in case of only one lib + if len(selected_libs) < 2: + return selected_libs + deplist = [] for lib in selected_libs: name = lib['name']