Merge pull request #4 from kaikreuzer/install

only install features if they are not already installed
pull/5/head
Kai Kreuzer 2016-01-05 00:31:00 +01:00
commit 907ed6613f
1 changed files with 5 additions and 2 deletions

View File

@ -78,8 +78,11 @@ public class FeatureInstaller {
private void installFeature(String name) {
try {
featuresService.installFeature(name);
logger.info("Installed '{}'", name);
Feature feature = featuresService.getFeature(name);
if (feature != null && !featuresService.isInstalled(feature)) {
featuresService.installFeature(name);
logger.info("Installed '{}'", name);
}
} catch (Exception e) {
logger.error("Failed installing '{}': {}", name, e.getMessage());
}