fix on_interrupt with logger
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
926d7d27ed
commit
d32f48031d
5
script
5
script
|
@ -25,7 +25,8 @@ EOH
|
||||||
}
|
}
|
||||||
|
|
||||||
on_interrupt() {
|
on_interrupt() {
|
||||||
print "Process aborted!\n"
|
log -l notice ""
|
||||||
|
log -l notice "Process aborted!"
|
||||||
|
|
||||||
exit 130
|
exit 130
|
||||||
}
|
}
|
||||||
|
@ -77,7 +78,7 @@ log() {
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ $LEVEL -ge $LOG_VERBOSE_VALUE ]; then
|
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
|
printf "%s%s%s\n" "${COLOR:-}" "${TIME:-}" "$LINE" >&2
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue