Copilot commented on code in PR #588:
URL: https://github.com/apache/grails-forge/pull/588#discussion_r2104902014


##########
grails-forge-core/src/main/java/org/grails/forge/feature/migration/DatabaseMigrationPlugin.java:
##########
@@ -60,6 +61,9 @@ public void apply(GeneratorContext generatorContext) {
                 .groupId("org.apache.grails")
                 .artifactId("grails-data-hibernate5-dbmigration")
                 .implementation());
+
+        final ClassLoader classLoader = 
Thread.currentThread().getContextClassLoader();
+        generatorContext.addTemplate(srcDirPath, new URLTemplate(srcDirPath + 
"/.gitkeep", classLoader.getResource(".gitkeep")));

Review Comment:
   The first argument to addTemplate should include the filename. Use 
srcDirPath + "/.gitkeep" instead of srcDirPath so the file is created with the 
correct path.
   ```suggestion
           generatorContext.addTemplate(srcDirPath + "/.gitkeep", new 
URLTemplate(srcDirPath + "/.gitkeep", classLoader.getResource(".gitkeep")));
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to