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>
This commit is contained in:
Levente Polyak 2023-01-12 22:19:08 +01:00
parent d45e77738b
commit 7b209b63a7
No known key found for this signature in database
GPG Key ID: FC1B547C8D8172C8
1 changed files with 4 additions and 4 deletions

View File

@ -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'