Rename helper into "ynh_exec_and_print_stderr_only_if_error"

This commit is contained in:
Alexandre Aubin 2023-10-30 14:03:26 +01:00 committed by GitHub
parent 6385b402f7
commit bfb7dda42e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -188,13 +188,13 @@ ynh_exec_fully_quiet() {
# Execute a command and redirect stderr in /dev/null. Print stderr on error. # Execute a command and redirect stderr in /dev/null. Print stderr on error.
# #
# usage: ynh_exec_stderr_on_error your command and args # usage: ynh_exec_and_print_stderr_only_if_error your command and args
# | arg: command - command to execute # | arg: command - command to execute
# #
# Note that you should NOT quote the command but only prefix it with ynh_exec_stderr_on_error # Note that you should NOT quote the command but only prefix it with ynh_exec_and_print_stderr_only_if_error
# #
# Requires YunoHost version 11.2 or higher. # Requires YunoHost version 11.2 or higher.
ynh_exec_stderr_on_error() { ynh_exec_and_print_stderr_only_if_error() {
logfile="$(mktemp)" logfile="$(mktemp)"
rc=0 rc=0
# 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