Merge pull request #733 from YunoHost/ynh_print_off

Fix ynh_print_OFF when set -x is used in other helpers
This commit is contained in:
Alexandre Aubin 2019-06-07 22:10:03 +02:00 committed by GitHub
commit e93526321a
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.
ynh_print_OFF () {
set +x
exec {BASH_XTRACEFD}>/dev/null
}
# Restore the logging after ynh_print_OFF
@ -181,7 +181,7 @@ ynh_print_OFF () {
#
# Requires YunoHost version 3.2.0 or higher.
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.
echo ynh_print_ON > /dev/null
}