Skip to content

Commit

Permalink
Fix quarkiverse#516: Better error message if failed moving files
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Sep 27, 2023
1 parent 80aa503 commit 1b9b06c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,14 @@ && isDevServerMode(configuredQuinoa.resolvedConfig())) {
}
final Path targetBuildDir = outputTarget.getOutputDirectory().resolve(TARGET_DIR_NAME);
FileUtil.deleteDirectory(targetBuildDir);
Files.move(buildDir, targetBuildDir);
try {
Files.move(buildDir, targetBuildDir);
} catch (IOException e) {
String message = String.format(
"Error moving directory '%s'. Please make sure no files are open such as in Windows Explorer or other tools. %s",
buildDir, e.getMessage());
throw new ConfigurationException(message);
}
liveReload.setContextObject(QuinoaLiveContext.class, new QuinoaLiveContext(targetBuildDir));
return new TargetDirBuildItem(targetBuildDir);
}
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/includes/attributes.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:quarkus-version: 3.2.6.Final
:quarkus-quinoa-version: 2.2.0.CR1
:quarkus-quinoa-version: 2.2.0.CR2
:maven-version: 3.8.1+
:extension-status: stable

Expand Down

0 comments on commit 1b9b06c

Please sign in to comment.