commitpkg: properly cleanup commit msg file on abort
Use the workdir location which gets cleaned up automatically. Previously this was leaking tmpfiles if the commitpkg command got aborted after file creation. Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
This commit is contained in:
parent
009c58f7c9
commit
d45e77738b
|
@ -132,7 +132,8 @@ if [[ -n $(svn status -q) ]]; then
|
|||
svn commit -q -m "${msgtemplate}: ${1}" || die
|
||||
stat_done
|
||||
else
|
||||
msgfile="$(mktemp)"
|
||||
[[ -z ${WORKDIR:-} ]] && setup_workdir
|
||||
msgfile=$(mktemp --tmpdir="${WORKDIR}" commitpkg.XXXXXXXXXX)
|
||||
echo "$msgtemplate" > "$msgfile"
|
||||
if [[ -n $SVN_EDITOR ]]; then
|
||||
$SVN_EDITOR "$msgfile"
|
||||
|
|
Loading…
Reference in New Issue