[ux] Add a message to explain that the app is being removed if the install fails

This commit is contained in:
Alexandre Aubin 2019-10-29 19:19:04 +01:00
parent 83b45d7894
commit 9ee3d234e8
2 changed files with 3 additions and 0 deletions

View file

@ -40,6 +40,7 @@
"app_requirements_checking": "Checking required packages for {app}…",
"app_requirements_failed": "Some requirements are not met for {app}: {error}",
"app_requirements_unmeet": "Requirements are not met for {app}, the package {pkgname} ({version}) must be {spec}",
"app_remove_after_failed_install": "Removing the app following the installation failure…",
"app_sources_fetch_failed": "Could not fetch sources files, is the URL correct?",
"app_start_install": "Installing the app '{app}'…",
"app_start_remove": "Removing the app '{app}'…",

View file

@ -1026,6 +1026,8 @@ def app_install(operation_logger, app, label=None, args=None, no_remove_on_failu
# This option is meant for packagers to debug their apps more easily
if no_remove_on_failure:
raise YunohostError("The installation of %s failed, but was not cleaned up as requested by --no-remove-on-failure." % app_id, raw_msg=True)
else:
logger.warning(m18n.n("app_remove_after_failed_install"))
# Setup environment for remove script
env_dict_remove = {}