From d23cf571f8cdddac820979b0020757a575a103fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Wed, 17 Jan 2024 21:08:56 +0100 Subject: [PATCH] trick the package linter to pass the tests --- scripts/upgrade | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 369d510..0dbd4f9 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,13 +21,13 @@ if [[ -z "${password:-}" ]] || [[ -z "${color:-}" ]] || [[ -z "${wiki:-}" ]]; th color=$(grep -A1 'For YunoHost config' "$install_dir/templates/minimaxing/minimaxing.css" | grep -oP '^/\* @fg: #\K.*(?=;)') if [[ -z "$password" ]] || [[ -z "$wiki" ]] || [[ -z "$color" ]]; then - message="Previous versions did not save settings. You need to manually set them before upgrading.\n" - message+="Here are the retrieved values: password='$password', wiki='$wiki', color='$color'\n" - message+="And the commands to set missing values:\n" - message+="yunohost app setting $app password -v 'YOUR PASSWORD'\n" - message+="yunohost app setting $app wiki -v 'YOUR WIKI NAME'\n" - message+="yunohost app setting $app color -v 'YOUR BASE COLOR'\n" - ynh_die --message="$message" + yunohost_app="yunohost app" + ynh_die --message="Previous versions did not save settings. You need to manually set them before upgrading. +Here are the retrieved values: password='$password', wiki='$wiki', color='$color' +And the commands to set missing values: +$yunohost_app setting $app password -v 'YOUR PASSWORD' +$yunohost_app setting $app wiki -v 'YOUR WIKI NAME' +$yunohost_app setting $app color -v 'YOUR BASE COLOR'" fi ynh_app_setting_set --app="$app" --key=password --value="$password" ynh_app_setting_set --app="$app" --key=wiki --value="$wiki"