Skip to content

Commit

Permalink
fix: Create additional variable to convert the array to string
Browse files Browse the repository at this point in the history
Addresses shellcheck SC2178
  • Loading branch information
Antiz96 committed Jul 5, 2024
1 parent a3cf01c commit 24689bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/script/arch-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 24689bc

Please sign in to comment.