copy_roller: Newline logic fix
Bug: b/356645484
Change-Id: Ic89b1fa4d980c0df7d8bc7028b8d63507d8deb66
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/226913
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Taylor Cramer <cramertj@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
diff --git a/recipes/copy_roller.py b/recipes/copy_roller.py
index 2f92d9b..3d9dc9c 100644
--- a/recipes/copy_roller.py
+++ b/recipes/copy_roller.py
@@ -65,9 +65,9 @@
commit_message: str = f'roll: {props.destination_path}'
try:
- value_string = value.decode()
+ value_string = value.decode().strip()
if '\n' not in value_string:
- new_commit_message = f'{commit_message}: {value_string.strip()}'
+ new_commit_message = f'{commit_message}: {value_string}'
if len(new_commit_message) <= 72:
commit_message = new_commit_message