added fix for possible globbing errors and fixed time string in error.log

pull/19/head
aristocratos 2020-04-07 21:14:22 +02:00
parent 8a0e03f470
commit 62d70751d5
1 changed files with 3 additions and 1 deletions

View File

@ -28,6 +28,8 @@
# limitations under the License. # limitations under the License.
declare LC_MESSAGES="C" LC_NUMERIC="C" declare LC_MESSAGES="C" LC_NUMERIC="C"
shopt -qu failglob globstar
shopt -qs extglob globasciiranges
declare -a banner banner_colors declare -a banner banner_colors
@ -405,7 +407,7 @@ traperr() { #? Function for reporting error line numbers
fi fi
if ((len>100)); then unset 'trace_array[@]'; fi if ((len>100)); then unset 'trace_array[@]'; fi
trace_array+=("$err") trace_array+=("$err")
printf "%(%X)T %s" "" "ERROR: On line $err $trap_muted" >> "${config_dir}/error.log" echo "$(printf "%(%X)T") ERROR: On line $err $trap_muted" >> "${config_dir}/error.log"
} }