Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/commitpkg.in
diff options
context:
space:
mode:
authorLevente Polyak <anthraxx@archlinux.org>2023-01-12 22:19:08 +0100
committerLevente Polyak <anthraxx@archlinux.org>2023-01-17 00:48:24 +0100
commit7b209b63a785c7375c360209ca5efe0c46a75c7a (patch)
tree1b99d17009234a86e65e830c7a7ae6f7d182b8ef /src/commitpkg.in
parentd45e77738bda2d17b10f87d05167a12fa5be8d63 (diff)
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 <anthraxx@archlinux.org>
Diffstat (limited to 'src/commitpkg.in')
-rw-r--r--src/commitpkg.in8
1 files 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'