From 763644d6fcb33af868b2a96308fb96f3015f56d6 Mon Sep 17 00:00:00 2001 From: masnagam Date: Sat, 30 Nov 2024 08:28:17 +0900 Subject: [PATCH] fix(recording): ignore empty lines --- recording/recording.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recording/recording.sh b/recording/recording.sh index 92d559b..1871917 100644 --- a/recording/recording.sh +++ b/recording/recording.sh @@ -169,6 +169,10 @@ replace_services() { SERVICES=$(curl "$BASE_URL/api/services" -sG) while read -r TSV do + if [ -z "$TSV" ] + then + continue + fi ID=$(echo "$TSV" | cut -f 1) SERVICE_ID=$(expr $ID / 100000) SERVICE=$(echo "$SERVICES" | jq -r ".[] | select(.id == $SERVICE_ID) | .name")