loadFromEnv = false;
settingsBuilder.loadFromUrl(environment.resolveConfig(System.getProperty("es.config")));
}
if (System.getProperty("elasticsearch.config") != null) {
loadFromEnv = false;
<BUG>settingsBuilder.loadFromUrl(environment.resolveConfig(System.getProperty("elasticsearch.config")));
}</BUG>
if (loadFromEnv) {
try {
settingsBuilder.loadFromUrl(environment.resolveConfig("elasticsearch.yml"));

loadFromEnv = false;
settingsBuilder.loadFromUrl(environment.resolveConfig(System.getProperty("es.config")));
}
if (System.getProperty("elasticsearch.config") != null) {
loadFromEnv = false;
settingsBuilder.loadFromUrl(environment.resolveConfig(System.getProperty("elasticsearch.config")));
}
}
if (loadFromEnv) {
try {
settingsBuilder.loadFromUrl(environment.resolveConfig("elasticsearch.yml"));
