Skip to content

Commit

Permalink
Sort prerequisites list for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
colluca committed Sep 7, 2024
1 parent b167db4 commit f20f213
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions list-make-prerequisites.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ def list_prerequisites(target, recursive=False, debug=False):
# Find all leaf prerequisites
leaf_prerequisites = [node.name for node in root.descendants if node.is_leaf]

# Remove repetitions
leaf_prerequisites = list(set(leaf_prerequisites))
# Remove repetitions and sort for consistency
leaf_prerequisites = sorted(list(set(leaf_prerequisites)))

# Return prerequisites
return leaf_prerequisites
Expand Down Expand Up @@ -158,7 +158,7 @@ def hash_files(file_list):

if args.hash:
# Print a hash of the prerequisites' contents
hash_value = hash_files(sorted(prerequisites))
hash_value = hash_files(prerequisites)
print(hash_value)
else:
# Print the list of prerequisites
Expand Down

0 comments on commit f20f213

Please sign in to comment.