[]

-               cd "$(dirname "$remove_trash")" &&
-               rm -rf "$(basename "$remove_trash")" ||
-               error "Tests passed but test cleanup failed; aborting"
+                       cd "$(dirname "$TRASH_DIRECTORY")" &&
+                       rm -fr "$TRASH_DIRECTORY" ||
+                       error "Tests passed but test cleanup failed; aborting"
+               fi

Yeah, that looks good to me.

Does it ?
Checking the error code of "rm -f" doesn't work as expected from the script:
rm -rf DoesNotExist ; echo $?
0

I think it should be

+                       cd "$(dirname "$TRASH_DIRECTORY")" &&
+                       rm -r "$TRASH_DIRECTORY" ||
+                       error "Tests passed but test cleanup failed; aborting"





Reply via email to