Fix ynh_print_OFF when set -x is used in other helpers

This commit is contained in:
Maniack Crudelis 2019-06-01 22:47:22 +02:00 committed by GitHub
parent d0c982a422
commit dcc493934c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -172,7 +172,7 @@ ynh_exec_fully_quiet () {
# #
# Requires YunoHost version 3.2.0 or higher. # Requires YunoHost version 3.2.0 or higher.
ynh_print_OFF () { ynh_print_OFF () {
set +x exec {BASH_XTRACEFD}>/dev/null
} }
# Restore the logging after ynh_print_OFF # Restore the logging after ynh_print_OFF
@ -181,7 +181,7 @@ ynh_print_OFF () {
# #
# Requires YunoHost version 3.2.0 or higher. # Requires YunoHost version 3.2.0 or higher.
ynh_print_ON () { ynh_print_ON () {
set -x exec {BASH_XTRACEFD}>&1
# Print an echo only for the log, to be able to know that ynh_print_ON has been called. # Print an echo only for the log, to be able to know that ynh_print_ON has been called.
echo ynh_print_ON > /dev/null echo ynh_print_ON > /dev/null
} }