bdelacretaz commented on a change in pull request #23:
URL:
https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#discussion_r830863903
##########
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:
I suggest a bit more precise message:
> Repoinit error, won't stop execution as
org.apache.sling.jcr.repoinit.developermode is set. Without that developer
option, startup would fail.
And the actual error should probably be logged in developer mode?
--
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]