Skip to content

Commit 0ca2852

Browse files
committed
Make the duplicate IDE version code not mess up sort order
The list was originally sorted correctly by version but it appears the sort --unique command changes the sort order back to alphabetical.
1 parent f30d214 commit 0ca2852

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arduino-ci-script.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ function generate_ide_version_list_array()
382382

383383
# Remove duplicates from list https://stackoverflow.com/a/13648438
384384
# shellcheck disable=SC2207
385-
readonly local uniqueIDElistArray=($(echo "${rawIDElistArray[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' '))
385+
readonly local uniqueIDElistArray=($(echo "${rawIDElistArray[@]}" | tr ' ' '\n' | sort --unique --version-sort | tr '\n' ' '))
386386

387387
# Generate ARDUINO_CI_SCRIPT_GENERATED_IDE_VERSION_LIST_ARRAY
388388
ARDUINO_CI_SCRIPT_GENERATED_IDE_VERSION_LIST_ARRAY="$ARDUINO_CI_SCRIPT_IDE_VERSION_LIST_ARRAY_DECLARATION"'('

0 commit comments

Comments
 (0)