mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
app_install: return post_install notifs to API
This commit is contained in:
parent
f096a14189
commit
d766e74a6a
1 changed files with 11 additions and 6 deletions
|
@ -1183,18 +1183,23 @@ def app_install(
|
||||||
|
|
||||||
logger.success(m18n.n("installation_complete"))
|
logger.success(m18n.n("installation_complete"))
|
||||||
|
|
||||||
# Display post_install notices in cli mode
|
|
||||||
if manifest["notifications"]["post_install"] and Moulinette.interface.type == "cli":
|
|
||||||
# Get the generated settings to hydrate notifications
|
# Get the generated settings to hydrate notifications
|
||||||
settings = _get_app_settings(app_instance_name)
|
settings = _get_app_settings(app_instance_name)
|
||||||
notifications = _filter_and_hydrate_notifications(
|
notifications = _filter_and_hydrate_notifications(
|
||||||
manifest["notifications"]["post_install"], data=settings
|
manifest["notifications"]["post_install"], data=settings
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Display post_install notices in cli mode
|
||||||
|
if notifications and Moulinette.interface.type == "cli":
|
||||||
_display_notifications(notifications, force=force)
|
_display_notifications(notifications, force=force)
|
||||||
|
|
||||||
# Call postinstall hook
|
# Call postinstall hook
|
||||||
hook_callback("post_app_install", env=env_dict)
|
hook_callback("post_app_install", env=env_dict)
|
||||||
|
|
||||||
|
# Return hydrated post install notif for API
|
||||||
|
if Moulinette.interface.type == "api":
|
||||||
|
return {"notifications": notifications}
|
||||||
|
|
||||||
|
|
||||||
@is_unit_operation()
|
@is_unit_operation()
|
||||||
def app_remove(operation_logger, app, purge=False):
|
def app_remove(operation_logger, app, purge=False):
|
||||||
|
|
Loading…
Add table
Reference in a new issue