Arch gem is not enabled by default

This commit is contained in:
Vinicius Moreira
2019-09-18 11:42:13 -03:00
parent e52616e0e5
commit da17ede1ec
16 changed files with 74 additions and 9 deletions

View File

@@ -313,3 +313,6 @@ class GenericSoftwareManager(SoftwareManager):
if man:
return exec('man.{}(pkg=pkg, root_password=root_password, watcher=watcher)'.format(action.manager_method))
def is_default_enabled(self) -> bool:
return True

View File

@@ -37,8 +37,10 @@ def load_managers(locale: str, context: ApplicationContext, enabled_gems: List[s
man = manager_class(context=context)
if enabled_gems is not None and f.name not in enabled_gems:
man.set_enabled(False)
if enabled_gems is None:
man.set_enabled(man.is_default_enabled())
else:
man.set_enabled(f.name in enabled_gems)
managers.append(man)