func trapExit: cleanup printf formatting

This commit is contained in:
Asif Bacchus 2020-08-14 00:03:32 -06:00
parent bbea5e871c
commit 44e57df831
1 changed files with 4 additions and 4 deletions

View File

@ -198,12 +198,12 @@ newline() {
# same as exitError but for signal captures
trapExit () {
printf "${err}[%s] -- [ERROR] 99: Caught signal --${norm}\n" \
"$(stamp)" >> "$logFile"
printf "%s[%s] -- [ERROR] 99: Caught signal --%s\n" \
"$err" "$(stamp)" "$norm" >> "$logFile"
cleanup
# note script completion with error
printf "${err}[%s] --- %s execution was terminated via signal ---${norm}\n" \
"$(stamp)" "$scriptName" >> "$logFile"
printf "%s[%s] --- %s execution was terminated via signal ---%s\n" \
"$err" "$(stamp)" "$scriptName" "$norm" >> "$logFile"
exit 99
}