Skip to content

Commit

Permalink
Merge pull request #43536 from gsmet/fix-rewrite-file-windows
Browse files Browse the repository at this point in the history
Quarkus Update - Replace \ by / in rewriteFile path on Windows
  • Loading branch information
gsmet authored Oct 2, 2024
2 parents bc42c5d + b15f758 commit c403ea7
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 c403ea7

Please sign in to comment.