Skip to content

Commit db366f9

Browse files
committed
Enforce 40 character SHA hashes
1 parent 927fd8a commit db366f9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

project.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,9 @@ def build(self, stdout=sys.stdout):
889889
([scheme_target] if scheme_target else [])
890890
)
891891
for compatible_swift in self.project['compatibility'].keys()[:1]:
892+
if len(self.project['compatibility'][compatible_swift]['commit']) != 40:
893+
common.debug_print("ERROR: Commits must be 40 character SHA hashes")
894+
exit(1)
892895
self.checkout_sha(
893896
self.project['compatibility'][compatible_swift]['commit'],
894897
stdout=stdout, stderr=stdout

0 commit comments

Comments
 (0)