-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
When recursively removing a directory fails you may get this error message:
ERROR: Cannot delete workspace :Unable to delete 'C:\Jenkins\workspace\master@3'. Tried 3 times (of a maximum of 3) waiting 0,1 sec between attempts.
This error message doesn't say which file that couldn't be removed so it's hard to debug / understand what has happened.
However, it looks like the file name is returned to ws-cleanup-plugin as a suppressed exception inside the thrown CompositeIOException (thrown by class PathRemover). It would be helpful if the suppressed exceptions were logged by we-cleanup-plugin.
Git client plugin does:
try {
Util.deleteContentsRecursive(workspace);
} catch (Exception e) {
e.printStackTrace(listener.error("Failed to clean the workspace"));
... which seems to print the suppressed exceptions