Merge "Honor --slave and --headless options better"
This commit is contained in:
commit
61bd3104dd
@ -443,7 +443,10 @@ public class WebAppInitializer extends GuiceServletContextListener implements Fi
|
||||
modules.add(sysInjector.getInstance(GetUserFilter.Module.class));
|
||||
|
||||
// StaticModule contains a "/*" wildcard, place it last.
|
||||
GerritOptions opts = sysInjector.getInstance(GerritOptions.class);
|
||||
if (opts.enableMasterFeatures()) {
|
||||
modules.add(sysInjector.getInstance(StaticModule.class));
|
||||
}
|
||||
|
||||
return sysInjector.createChildInjector(modules);
|
||||
}
|
||||
|
@ -137,10 +137,9 @@ public class StaticModule extends ServletModule {
|
||||
});
|
||||
if (!options.headless()) {
|
||||
install(new CoreStaticModule());
|
||||
}
|
||||
|
||||
install(new PolyGerritModule());
|
||||
}
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
|
@ -611,7 +611,10 @@ public class Daemon extends SiteProgram {
|
||||
modules.add(sysInjector.getInstance(GetUserFilter.Module.class));
|
||||
|
||||
// StaticModule contains a "/*" wildcard, place it last.
|
||||
GerritOptions opts = sysInjector.getInstance(GerritOptions.class);
|
||||
if (opts.enableMasterFeatures()) {
|
||||
modules.add(sysInjector.getInstance(StaticModule.class));
|
||||
}
|
||||
|
||||
return sysInjector.createChildInjector(modules);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user