From f3837bae79fd4b2b721f9f1bb1cbd3c614fa5305 Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Fri, 18 Feb 2022 15:57:28 +0100 Subject: [PATCH] fix ynh_exec_*: ensure the arg message is used --- helpers/logging | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/helpers/logging b/helpers/logging index 4ac116c26..6562f5e3c 100644 --- a/helpers/logging +++ b/helpers/logging @@ -95,10 +95,10 @@ ynh_exec_err() { # we detect this by checking that there's no 2nd arg, and $1 contains a space if [[ "$#" -eq 1 ]] && [[ "$1" == *" "* ]] then - ynh_print_err "$(eval $@)" + ynh_print_err --message="$(eval $@)" else # Note that "$@" is used and not $@, c.f. https://unix.stackexchange.com/a/129077 - ynh_print_err "$("$@")" + ynh_print_err --message="$("$@")" fi } @@ -116,10 +116,10 @@ ynh_exec_warn() { # we detect this by checking that there's no 2nd arg, and $1 contains a space if [[ "$#" -eq 1 ]] && [[ "$1" == *" "* ]] then - ynh_print_warn "$(eval $@)" + ynh_print_warn --message="$(eval $@)" else # Note that "$@" is used and not $@, c.f. https://unix.stackexchange.com/a/129077 - ynh_print_warn "$("$@")" + ynh_print_warn --message="$("$@")" fi } @@ -317,4 +317,4 @@ ynh_script_progression() { # Requires YunoHost version 3.6.0 or higher. ynh_return() { echo "$1" >>"$YNH_STDRETURN" -} \ No newline at end of file +}