Skip to content

Commit

Permalink
Fixes CLI --refresh option
Browse files Browse the repository at this point in the history
(cherry picked from commit 0e1df6b)
  • Loading branch information
aloubyansky authored and gsmet committed Jul 21, 2021
1 parent abb2e13 commit 82cef00
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ public void clearCache() throws RegistryResolutionException {
}
if (Files.exists(dir)) {
try {
Files.list(dir).forEach(path -> path.toFile().deleteOnExit());
Files.list(dir).forEach(path -> {
try {
Files.delete(path);
} catch (IOException e) {
}
});
} catch (IOException e) {
throw new RegistryResolutionException("Failed to read directory " + dir, e);
}
Expand Down

0 comments on commit 82cef00

Please sign in to comment.