From 24689bc32b1c87605311d5d2c1763bb91bd8f236 Mon Sep 17 00:00:00 2001 From: Robin Candau Date: Fri, 5 Jul 2024 12:58:07 +0200 Subject: [PATCH] fix: Create additional variable to convert the array to string Addresses shellcheck SC2178 --- src/script/arch-update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/script/arch-update.sh b/src/script/arch-update.sh index 463b5cd..b7357f4 100755 --- a/src/script/arch-update.sh +++ b/src/script/arch-update.sh @@ -383,8 +383,8 @@ list_news() { answer_array+=("${i}") done else - answer_array=$(printf "%s\n" "${answer_array[@]}") - answer_array=($(echo "${answer_array}" | awk '!seen[$0]++')) + array_to_string=$(printf "%s\n" "${answer_array[@]}") + answer_array=($(echo "${array_to_string}" | awk '!seen[$0]++')) fi for num in "${answer_array[@]}"; do