Skip to content

Commit

Permalink
Quarkus Update - Replace \ by / in rewriteFile path on Windows
Browse files Browse the repository at this point in the history
Fixes #43473
  • Loading branch information
gsmet committed Oct 1, 2024
1 parent a4fcec1 commit b15f758
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,15 @@ private static void runGradleUpdate(MessageWriter log, Path baseDir, String rewr
new InputStreamReader(inputStream, StandardCharsets.UTF_8))
.lines()
.collect(Collectors.joining("\n"));

String rewriteFile = recipe.toAbsolutePath().toString();
if (OS.WINDOWS.isCurrent()) {
rewriteFile = rewriteFile.replace('\\', '/');
}

Files.writeString(tempInit,
Qute.fmt(template, Map.of(
"rewriteFile", recipe.toAbsolutePath().toString(),
"rewriteFile", rewriteFile,
"pluginVersion", rewritePluginVersion,
"recipesGAV", recipesGAV,
"activeRecipe", RECIPE_IO_QUARKUS_OPENREWRITE_QUARKUS,
Expand Down

0 comments on commit b15f758

Please sign in to comment.