]> git.tue.mpg.de Git - dss.git/commitdiff
prune: Fail gracefully if pre-rm hook fails.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 1 Sep 2019 17:29:39 +0000 (19:29 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 21 Sep 2019 13:08:40 +0000 (15:08 +0200)
In this case wait_for_remove_process() returns non-negative and we
miss to set the exit code, making the command appear to succeed even
if the rm process has not been created.

dss.c

diff --git a/dss.c b/dss.c
index a219cfd37b4569fbc3aa67fb2d4443a950353197..f91883aefd467665ffa6c4858657dc1a532ef998 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -1675,6 +1675,7 @@ rm:
                ret = wait_for_remove_process();
                if (ret < 0)
                        goto out;
+               ret = -E_HOOK_FAILED;
                if (snapshot_removal_status != HS_PRE_SUCCESS)
                        goto out;
        }