Merge pull request #741 from YunoHost/less-madness-in-debug-log-from-script-progression

Use set +x / -x to hide the whole ynh_script_progression computation
This commit is contained in:
Alexandre Aubin 2019-06-30 00:30:33 +02:00 committed by GitHub
commit aa25fff70a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -208,6 +208,7 @@ progress_string0="...................."
# Define base_time when the file is sourced
base_time=$(date +%s)
ynh_script_progression () {
set +x
# Declare an array to define the options of this helper.
local legacy_args=mwtl
declare -Ar args_array=( [m]=message= [w]=weight= [t]=time [l]=last )
@ -217,6 +218,7 @@ ynh_script_progression () {
local last
# Manage arguments with getopts
ynh_handle_getopts_args "$@"
set +x
weight=${weight:-1}
time=${time:-0}
last=${last:-0}
@ -280,6 +282,7 @@ ynh_script_progression () {
fi
ynh_print_info "[$progression_bar] > ${message}${print_exec_time}"
set -x
}
# Debugger for app packagers