There are a number of exit paths where the logpipe fifo remains in the
logging directory.  Remove it if it exists when cleaning up at exit.

Signed-off-by: Austin Lund <[email protected]>
---
 scripts/makepkg.sh.in | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 43484db3..0e0d3461 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -129,6 +129,8 @@ clean_up() {
                return 0
        fi
 
+       [[ -p $logpipe ]] && rm "$logpipe"
+
        if (( (EXIT_CODE == E_OK || EXIT_CODE == E_INSTALL_FAILED) && CLEANUP 
)); then
                local pkg file
 
@@ -343,9 +345,6 @@ remove_deps() {
 }
 
 error_function() {
-       if [[ -p $logpipe ]]; then
-               rm "$logpipe"
-       fi
        # first exit all subshells, then print the error
        if (( ! BASH_SUBSHELL )); then
                error "$(gettext "A failure occurred in %s().")" "$1"
-- 
2.23.0

Reply via email to