Skip to content

Commit 3dcef61

Browse files
committed
fix: Initialize gitea_tests array
The `gitea_tests` array was not explicitly initialized, which could lead to unexpected behavior if the array was used before any elements were assigned. This change ensures it is initialized as an empty array.
1 parent db0fceb commit 3dcef61

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

hack/gh-workflow-ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ get_tests() {
7070
mapfile -t testfiles < <(find test/ -maxdepth 1 -name '*.go')
7171
all_tests=$(grep -hioP '^func[[:space:]]+Test[[:alnum:]_]+' "${testfiles[@]}" | sed -E 's/^func[[:space:]]+//')
7272

73-
local -a gitea_tests
73+
local -a gitea_tests=()
7474
if [[ "${target}" == *"gitea"* ]]; then
7575
# Filter Gitea tests, excluding Concurrency tests
7676
mapfile -t gitea_tests < <(echo "${all_tests}" | grep -iP '^TestGitea' 2>/dev/null | grep -ivP 'Concurrency' 2>/dev/null | sort 2>/dev/null)

0 commit comments

Comments
 (0)