summaryrefslogtreecommitdiff
path: root/src/main/java/uk/co
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/uk/co')
-rw-r--r--src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java7
1 files changed, 5 insertions, 2 deletions
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 eca58ec..ab9971d 100644
--- a/src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java
+++ b/src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java
@@ -39,10 +39,13 @@ public class GitPushController {
log.info("Received commits: " + commitMsg);
//DANGER
- Runtime.getRuntime().exec(new String[]{"/bin/bash", "-c", "echo theblueroom " + pushMsg.getUserName() + " pushed to " + pushMsg.getRepository().getName() + ": "+ commitMsg + " | bash /home/smsd/msgrelay.bash "});
+ String command = "echo theblueroom " + pushMsg.getUserName() + " pushed to " + pushMsg.getRepository().getName() + ": "+ commitMsg + " | bash /home/smsd/msgrelay.bash ";
+ log.info("Running command: " + command);
+
+ Runtime.getRuntime().exec(new String[]{"/bin/bash", "-c", command});
model.addAttribute("result", "OK");
} catch (IOException e) {
- System.out.println("Failed to run command");
+ log.error("Failed to run command");
e.printStackTrace();
model.addAttribute("result", "failed");
}