From 8950c5e28033b0abdf65c67a8c5bf0de8a833d63 Mon Sep 17 00:00:00 2001 From: Joe Robinson Date: Fri, 11 Dec 2015 00:46:06 +0000 Subject: Trim commit message to avoid newlines --- src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java b/src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java index 825ce8f..eb5ff74 100644 --- a/src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java +++ b/src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java @@ -29,8 +29,9 @@ public class GitPushController { if (StringUtils.isNotEmpty(commitMsg)) { commitMsg += ", "; } - commitMsg += commit.getMessage(); + commitMsg += commit.getMessage().trim(); } + log.info(commitMsg); Runtime.getRuntime().exec(new String[]{"/bin/bash", "-c", "echo theblueroom beep | bash /home/smsd/msgrelay.bash "}); -- cgit v1.2.3