From 9ee3d234e8db1080dd5d87f3bec0b802a1035943 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 29 Oct 2019 19:19:04 +0100 Subject: [PATCH] [ux] Add a message to explain that the app is being removed if the install fails --- locales/en.json | 1 + src/yunohost/app.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/locales/en.json b/locales/en.json index 202650edb..27f25e095 100644 --- a/locales/en.json +++ b/locales/en.json @@ -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}'…", diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 1e82b78ba..a4185b880 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -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 = {}