mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-10 13:21:53 +01:00
only install features if they are not already installed
Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
parent
ef486cff7d
commit
bf23b738a0
@ -78,8 +78,11 @@ public class FeatureInstaller {
|
|||||||
|
|
||||||
private void installFeature(String name) {
|
private void installFeature(String name) {
|
||||||
try {
|
try {
|
||||||
featuresService.installFeature(name);
|
Feature feature = featuresService.getFeature(name);
|
||||||
logger.info("Installed '{}'", name);
|
if (feature != null && !featuresService.isInstalled(feature)) {
|
||||||
|
featuresService.installFeature(name);
|
||||||
|
logger.info("Installed '{}'", name);
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Failed installing '{}': {}", name, e.getMessage());
|
logger.error("Failed installing '{}': {}", name, e.getMessage());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user