mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #1442 from Tagadda/patch-1
fix ynh_exec_*: ensure the arg message is used
This commit is contained in:
commit
680811eeff
1 changed files with 5 additions and 5 deletions
|
@ -95,10 +95,10 @@ ynh_exec_err() {
|
||||||
# we detect this by checking that there's no 2nd arg, and $1 contains a space
|
# we detect this by checking that there's no 2nd arg, and $1 contains a space
|
||||||
if [[ "$#" -eq 1 ]] && [[ "$1" == *" "* ]]
|
if [[ "$#" -eq 1 ]] && [[ "$1" == *" "* ]]
|
||||||
then
|
then
|
||||||
ynh_print_err "$(eval $@)"
|
ynh_print_err --message="$(eval $@)"
|
||||||
else
|
else
|
||||||
# Note that "$@" is used and not $@, c.f. https://unix.stackexchange.com/a/129077
|
# Note that "$@" is used and not $@, c.f. https://unix.stackexchange.com/a/129077
|
||||||
ynh_print_err "$("$@")"
|
ynh_print_err --message="$("$@")"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,10 +116,10 @@ ynh_exec_warn() {
|
||||||
# we detect this by checking that there's no 2nd arg, and $1 contains a space
|
# we detect this by checking that there's no 2nd arg, and $1 contains a space
|
||||||
if [[ "$#" -eq 1 ]] && [[ "$1" == *" "* ]]
|
if [[ "$#" -eq 1 ]] && [[ "$1" == *" "* ]]
|
||||||
then
|
then
|
||||||
ynh_print_warn "$(eval $@)"
|
ynh_print_warn --message="$(eval $@)"
|
||||||
else
|
else
|
||||||
# Note that "$@" is used and not $@, c.f. https://unix.stackexchange.com/a/129077
|
# Note that "$@" is used and not $@, c.f. https://unix.stackexchange.com/a/129077
|
||||||
ynh_print_warn "$("$@")"
|
ynh_print_warn --message="$("$@")"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue