mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
Merge pull request #4 from kaikreuzer/install
only install features if they are not already installed
This commit is contained in:
+5
-2
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user