mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
app_install: update notifications display with helpers
This commit is contained in:
parent
d0faf8a64a
commit
a54e976e21
1 changed files with 10 additions and 12 deletions
22
src/app.py
22
src/app.py
|
@ -908,11 +908,10 @@ def app_install(
|
||||||
|
|
||||||
# Display pre_install notices in cli mode
|
# Display pre_install notices in cli mode
|
||||||
if manifest["notifications"]["pre_install"] and Moulinette.interface.type == "cli":
|
if manifest["notifications"]["pre_install"] and Moulinette.interface.type == "cli":
|
||||||
for notice in manifest["notifications"]["pre_install"].values():
|
notifications = _filter_and_hydrate_notifications(
|
||||||
# Should we render the markdown maybe? idk
|
manifest["notifications"]["pre_install"]
|
||||||
print("==========")
|
)
|
||||||
print(_value_for_locale(notice))
|
_display_notifications(notifications, force=force)
|
||||||
print("==========")
|
|
||||||
|
|
||||||
packaging_format = manifest["packaging_format"]
|
packaging_format = manifest["packaging_format"]
|
||||||
|
|
||||||
|
@ -1182,13 +1181,12 @@ def app_install(
|
||||||
|
|
||||||
# Display post_install notices in cli mode
|
# Display post_install notices in cli mode
|
||||||
if manifest["notifications"]["post_install"] and Moulinette.interface.type == "cli":
|
if manifest["notifications"]["post_install"] and Moulinette.interface.type == "cli":
|
||||||
# (Call app_info to get the version hydrated with settings)
|
# Get the generated settings to hydrate notifications
|
||||||
infos = app_info(app_instance_name, full=True)
|
settings = _get_app_settings(app_instance_name)
|
||||||
for notice in infos["manifest"]["notifications"]["post_install"].values():
|
notifications = _filter_and_hydrate_notifications(
|
||||||
# Should we render the markdown maybe? idk
|
manifest["notifications"]["post_install"], data=settings
|
||||||
print("==========")
|
)
|
||||||
print(_value_for_locale(notice))
|
_display_notifications(notifications, force=force)
|
||||||
print("==========")
|
|
||||||
|
|
||||||
# Call postinstall hook
|
# Call postinstall hook
|
||||||
hook_callback("post_app_install", env=env_dict)
|
hook_callback("post_app_install", env=env_dict)
|
||||||
|
|
Loading…
Add table
Reference in a new issue