test/rcdn-hooks-failure.t
raw| 1 | $ . "$TESTDIR/helper.sh" |
| 2 | |
| 3 | Pre-down hooks failing should prevent rcdn continuing |
| 4 | |
| 5 | $ mkdir -p .dotfiles/hooks/pre-down |
| 6 | > printf "#!/bin/sh\necho '1'\nexit 7\n" > .dotfiles/hooks/pre-down/00-test.sh |
| 7 | > printf "#!/bin/sh\necho '2'\n" > .dotfiles/hooks/pre-down/01-test.sh |
| 8 | |
| 9 | $ chmod +x .dotfiles/hooks/pre-down/00-test.sh |
| 10 | > chmod +x .dotfiles/hooks/pre-down/01-test.sh |
| 11 | |
| 12 | $ rcdn |
| 13 | 1 |
| 14 | pre-down hook */.dotfiles/hooks/pre-down/00-test.sh exited non-zero (7) (glob) |
| 15 | [7] |
| 16 |