Skip to content

Commit

Permalink
Fix #516: Better error message if failed moving files (#525)
Browse files Browse the repository at this point in the history
* Fix #516: Better error message if failed moving files

* Update deployment/src/main/java/io/quarkiverse/quinoa/deployment/QuinoaProcessor.java

Co-authored-by: Andy Damevin <[email protected]>

---------

Co-authored-by: Andy Damevin <[email protected]>
  • Loading branch information
melloware and ia3andy authored Sep 28, 2023
1 parent 80aa503 commit 1b507f6
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 -> %s'. Please make sure no files are open such as in Files Explorer or other tools.",
buildDir, targetBuildDir);
throw new IOException(message, e);
}
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 1b507f6

Please sign in to comment.