diff --git a/CHANGELOG.md b/CHANGELOG.md index 575bf7e10..ceb12d6cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ Last public release: [![Maven Central](https://maven-badges.herokuapp.com/maven- ## Changelog +### 1.7.7 + +* Fix #749: Plugin will no longer fail during the node install step if it cannot delete the temporary directory. + ### 1.7.6 * Fix #670: Plugin will no longer fail to install node.exe if node.exe already exists diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/NodeInstaller.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/NodeInstaller.java index 0fa7fdf1d..5a583bcfe 100644 --- a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/NodeInstaller.java +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/NodeInstaller.java @@ -317,7 +317,13 @@ private File getInstallDirectory() { private void deleteTempDirectory(File tmpDirectory) throws IOException { if (tmpDirectory != null && tmpDirectory.exists()) { this.logger.debug("Deleting temporary directory {}", tmpDirectory); - FileUtils.deleteDirectory(tmpDirectory); + try { + FileUtils.deleteDirectory(tmpDirectory); + } catch (IOException e) { + this.logger.warn( + "Temporary directory could not be deleted, please delete it manually. Tempdir location: {}", + tmpDirectory.getPath()); + } } }