From 5cd1f5e92353bb228a422222d998e7fd6fd0a7ae Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Tue, 13 Oct 2015 17:47:30 +0000 Subject: pbuilder-runhooks: let unloadhooks don't fail if there are no hooks loaded This way we can call it also when hooks are not actually loaded or two times in a row without fear the result. --- pbuilder-runhooks | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pbuilder-runhooks b/pbuilder-runhooks index fbb9e75..0b921b0 100644 --- a/pbuilder-runhooks +++ b/pbuilder-runhooks @@ -53,11 +53,7 @@ function unloadhooks () { if [ -z "$HOOKDIR" ]; then return ; fi - if [ -d "$BUILDPLACE/$hooks" ]; then - rm -rf "$BUILDPLACE/$hooks" - else - log "E: Logic failure in hook handling. Directory $BUILDPLACE/$hooks should exist but it does not." - fi + rm -rf "$BUILDPLACE/$hooks" } #-------------------------------------------------------------------------- -- cgit v1.2.3