joerghoh commented on a change in pull request #23:
URL: 
https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#discussion_r832443105



##########
File path: 
src/main/java/org/apache/sling/jcr/repoinit/impl/RepositoryInitializerFactory.java
##########
@@ -99,43 +105,54 @@ public String toString() {
 
     @Override
     public void processRepository(final SlingRepository repo) throws Exception 
{
-        if ( (config.references() != null && config.references().length > 0)
-           || (config.scripts() != null && config.scripts().length > 0 )) {
+        // loginAdministrative is ok here, definitely an admin operation
+        final Session s = repo.loginAdministrative(null);
+        try {
+            executeScripts(s, config);
+        } catch (Exception e) {
+            if (isDeveloperModeEnabled()) {
+                log.error("Eror in the repoinit scripts, which is ignored 
because the developer mode is active. "

Review comment:
       thanks, changed the wording and also added the exception.




-- 
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