From 02480d27d7ebe2d119ab7766c91027b8bf0f07e6 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 14 Sep 2021 22:48:03 +0200 Subject: [PATCH 1/2] Wording --- locales/en.json | 2 +- src/yunohost/utils/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/locales/en.json b/locales/en.json index 5ad7d25b7..5bb408f1d 100644 --- a/locales/en.json +++ b/locales/en.json @@ -15,7 +15,7 @@ "app_already_up_to_date": "{app} is already up-to-date", "app_argument_choice_invalid": "Use one of these choices '{choices}' for the argument '{name}' instead of '{value}'", "app_argument_invalid": "Pick a valid value for the argument '{name}': {error}", - "app_argument_password_help": "Type the key Enter to keep the old value", + "app_argument_password_help_keep": "Press Enter to keep the current value", "app_argument_password_help_optional": "Type one space to empty the password", "app_argument_password_no_default": "Error while parsing password argument '{name}': password argument can't have a default value for security reason", "app_argument_required": "Argument '{name}' is required", diff --git a/src/yunohost/utils/config.py b/src/yunohost/utils/config.py index 6f3d05622..ccd8951eb 100644 --- a/src/yunohost/utils/config.py +++ b/src/yunohost/utils/config.py @@ -695,7 +695,7 @@ class PasswordQuestion(Question): need_column = self.current_value or self.optional text_for_user_input_in_cli = super()._format_text_for_user_input_in_cli(need_column) if self.current_value: - text_for_user_input_in_cli += "\n - " + m18n.n("app_argument_password_help") + text_for_user_input_in_cli += "\n - " + m18n.n("app_argument_password_help_keep") if self.optional: text_for_user_input_in_cli += "\n - " + m18n.n("app_argument_password_help_optional") From acb40424a666ede211b2cc1cd82f3f998de2839c Mon Sep 17 00:00:00 2001 From: Kay0u Date: Wed, 15 Sep 2021 16:40:47 +0200 Subject: [PATCH 2/2] avoid to retrieve final path in the config panel scripts --- src/yunohost/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index b42bed925..cfd773bd9 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -1766,7 +1766,6 @@ class AppConfigPanel(ConfigPanel): default_script = """#!/bin/bash source /usr/share/yunohost/helpers ynh_abort_if_errors -final_path=$(ynh_app_setting_get $app final_path) ynh_app_config_run $1 """ write_to_file(config_script, default_script) @@ -1774,11 +1773,13 @@ ynh_app_config_run $1 # Call config script to extract current values logger.debug(f"Calling '{action}' action from config script") app_id, app_instance_nb = _parse_app_instance_name(self.app) + settings = _get_app_settings(app_id) env.update( { "app_id": app_id, "app": self.app, "app_instance_nb": str(app_instance_nb), + "final_path": settings.get("final_path", "") } )