From 7b209b63a785c7375c360209ca5efe0c46a75c7a Mon Sep 17 00:00:00 2001 From: Levente Polyak Date: Thu, 12 Jan 2023 22:19:08 +0100 Subject: commitpkg: abort execution if msg file editor exits none-successfully Previously the script execution did not abort if the msg file editor exited none-successfully leading to undesired commits with a potentially unfinished message. Instead abort the commit if the msg file editor is deliberately terminated with a failure code. Signed-off-by: Levente Polyak --- src/commitpkg.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commitpkg.in b/src/commitpkg.in index 2f0ea1f..ef30544 100644 --- a/src/commitpkg.in +++ b/src/commitpkg.in @@ -136,13 +136,13 @@ if [[ -n $(svn status -q) ]]; then msgfile=$(mktemp --tmpdir="${WORKDIR}" commitpkg.XXXXXXXXXX) echo "$msgtemplate" > "$msgfile" if [[ -n $SVN_EDITOR ]]; then - $SVN_EDITOR "$msgfile" + $SVN_EDITOR "$msgfile" || die elif [[ -n $VISUAL ]]; then - $VISUAL "$msgfile" + $VISUAL "$msgfile" || die elif [[ -n $EDITOR ]]; then - $EDITOR "$msgfile" + $EDITOR "$msgfile" || die else - vi "$msgfile" + vi "$msgfile" || die fi [[ -s $msgfile ]] || die stat_busy 'Committing changes to trunk' -- cgit v1.2.3-70-g09d2