skip debug log on partial lines if buffer length is 0

This commit is contained in:
2024-09-30 13:34:26 +02:00
parent 95c8c276ac
commit df9b79f931

View File

@@ -460,8 +460,10 @@ function main() {
read -r -t 1 -u $STDIN buf read -r -t 1 -u $STDIN buf
rc=$? rc=$?
if (( rc > 128 )); then if (( rc > 128 )); then
line+=$buf if [ -n "$buf" ]; then
echo "< $buf (partial line: '$line')" >&$DEBUGLOG line+=$buf
echo "< $buf (partial line: '$line')" >&$DEBUGLOG
fi
continue continue
elif (( rc == 0 )); then elif (( rc == 0 )); then
line+=$buf line+=$buf