Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #516: Better error message if failed moving files #525

Merged
merged 2 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
melloware marked this conversation as resolved.
Show resolved Hide resolved
}
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