summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2012-09-27 04:02:47 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2012-09-27 04:02:47 (GMT)
commitee7708354bb0a068fd7c891fcbd8cbd8873b4643 (patch)
treeee23aea4f6415bd7b9888059df4660d8516a5104
parentd8a7404e0bf6653231db80bec7ffaa517fdb33b0 (diff)
downloadtip-bot-ee7708354bb0a068fd7c891fcbd8cbd8873b4643.zip
tip-bot-ee7708354bb0a068fd7c891fcbd8cbd8873b4643.tar.gz
tip-bot-ee7708354bb0a068fd7c891fcbd8cbd8873b4643.tar.bz2
tip-bot-ee7708354bb0a068fd7c891fcbd8cbd8873b4643.tar.xz
Don't let a missing failsafe file stop the failsafe message from going out
-rwxr-xr-xrobot.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/robot.sh b/robot.sh
index d9d43b4..87d5ffa 100755
--- a/robot.sh
+++ b/robot.sh
@@ -61,7 +61,7 @@ max_mails=100
if [ $count -gt $max_mails ]; then
# Failsafe!
git reset --hard $OLD_HEAD
- LAST_FAILSAFE=$(cat "$topdir"/last_failsafe)
+ LAST_FAILSAFE=$(cat "$topdir"/last_failsafe 2>/dev/null || true)
if [ x"$NEW_HEAD" != x"$LAST_FAILSAFE" ]; then
echo "$NEW_HEAD" > "$topdir"/last_failsafe
# A mostly arbitrary string as long as it doesn't occur anywhere...