fix on_interrupt with logger
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Simon Vieille 2023-05-21 15:56:04 +02:00
parent 926d7d27ed
commit d32f48031d
Signed by: deblan
GPG key ID: 579388D585F70417

5
script
View file

@ -25,7 +25,8 @@ EOH
}
on_interrupt() {
print "Process aborted!\n"
log -l notice ""
log -l notice "Process aborted!"
exit 130
}
@ -77,7 +78,7 @@ log() {
esac
if [ $LEVEL -ge $LOG_VERBOSE_VALUE ]; then
printf "%s" "$*" | while IFS='' read -r LINE; do
printf "%s\n" "$*" | while IFS='' read -r LINE; do
printf "%s%s%s\n" "${COLOR:-}" "${TIME:-}" "$LINE" >&2
done
fi