Skip to content

Commit 7e4abef

Browse files
committed
testenv: Don't try to cleanup state dir if it doesn't exist
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
1 parent f023ad9 commit 7e4abef

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

testenv/testenv.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ cleanup()
147147
{
148148
[ -n "$CLEANUP_FUNC" ] && $CLEANUP_FUNC
149149

150+
[ -d "$STATEDIR" ] || return 0
151+
150152
local statefiles=("$STATEDIR"/*.state)
151153

152154
if [ "${#statefiles[*]}" -eq 1 ] && [ ! -e "${statefiles[0]}" ]; then

0 commit comments

Comments
 (0)