Skip to content

Commit 5202b12

Browse files
committed
test: do not fail-fast
1 parent eec83c3 commit 5202b12

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
version: ['3.2', '4.0', '4.1', '4.2', '4.3', '4.4', '5.0', '5.1', 'latest']
19+
fail-fast: false
1920
runs-on: ubuntu-latest
2021
steps:
2122
- uses: actions/checkout@v4

src/sqids

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ to_id() {
641641
local id_chars=()
642642

643643
while true; do
644-
id_chars=("${alphabet:$((num % ${#alphabet})):1}" "${id_chars[@]}")
644+
id_chars=("${alphabet:$((num % ${#alphabet})):1}" "${id_chars[@]+"${id_chars[@]}"}") # it can be "${id_chars[@]}" without `set -u`, workaround for bash 4.0.0
645645
num=$((num / ${#alphabet}))
646646
if [[ $num -eq 0 ]]; then
647647
break
@@ -1096,7 +1096,7 @@ main() {
10961096
case "$mode" in
10971097
"encode")
10981098
if $flag_a || $flag_b; then
1099-
encode -a "$alphabet" -b "${filtered_blocklist[*]}" -l "$min_length" "$@"
1099+
encode -a "$alphabet" -b "${filtered_blocklist[*]+"${filtered_blocklist[*]}"}" -l "$min_length" "$@" # it can be "${filtered_blocklist[*]}" without `set -u`, workaround for bash 4.0.0
11001100
else
11011101
encode -a "$alphabet" -b "${block_list[*]}" -l "$min_length" "$@"
11021102
fi

0 commit comments

Comments
 (0)