bdelacretaz commented on code in PR #23: URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#discussion_r841457200
########## src/main/java/org/apache/sling/jcr/repoinit/impl/RepositoryInitializerFactory.java: ########## @@ -99,43 +107,50 @@ 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 (continueOnError()) { + log.error("Repoinit error, won't stop execution because {} is set to non-true. Without this " Review Comment: "set to non-true" takes more mental bandwidth than "false" or "set to false", IMHO ;-) -- 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: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org