diff options
author | Levente Polyak <anthraxx@archlinux.org> | 2023-01-12 22:19:08 +0100 |
---|---|---|
committer | Levente Polyak <anthraxx@archlinux.org> | 2023-01-17 00:48:24 +0100 |
commit | 7b209b63a785c7375c360209ca5efe0c46a75c7a (patch) | |
tree | 1b99d17009234a86e65e830c7a7ae6f7d182b8ef | |
parent | d45e77738bda2d17b10f87d05167a12fa5be8d63 (diff) | |
download | devtools-7b209b63a785c7375c360209ca5efe0c46a75c7a.tar.xz |
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>
-rw-r--r-- | src/commitpkg.in | 8 |
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' |