Skip to content

Commit 69f572e

Browse files
authored
Strip whitespace from commit SHA
1 parent e2c2bb1 commit 69f572e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sbom.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ def get_release_tools_commit_sha() -> str:
104104
stdout = subprocess.check_output(
105105
["git", "rev-parse", "--prefix", git_prefix, "HEAD"],
106106
cwd=git_prefix
107-
).decode("ascii")
108-
assert re.match(r"^[a-f0-9]{40,}$", stdout)
107+
).decode("ascii").strip()
108+
assert re.fullmatch(r"^[a-f0-9]{40,}$", stdout)
109109
return stdout
110110

111111

0 commit comments

Comments
 (0)