From 17913151edce45803f88c06daa4fa70c46550bd5 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sat, 29 Jan 2022 14:38:11 +0100 Subject: [PATCH] Fix ./unrealircd hot-patch: if a patch does not cleanly apply then don't apply it. The dry-run code was missing the most obvious case.. --- unrealircd.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/unrealircd.in b/unrealircd.in index 58a205688..15f8a81ca 100644 --- a/unrealircd.in +++ b/unrealircd.in @@ -242,6 +242,11 @@ elif [ "$1" = "hot-patch" -o "$1" = "cold-patch" ] ; then exit 1 fi + if ! patch --dry-run -p1 -N /dev/null 2>&1; then + echo "Patch failed to apply (no files changed)" + exit 1 + fi + if ! patch -p1