Skip to content

Commit 3148566

Browse files
committed
Ensure consistent sort order using LC_ALL=C
> *** WARNING *** The locale specified by the environment affects sort > order. Set LC_ALL=C to get the traditional sort order that uses native > byte values. > — `man sort`
1 parent ba17fe5 commit 3148566

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

generateIndices.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ generate_indices() {
77
local index_file="$dir/index.ts"
88

99
local -a ts_files
10-
mapfile -t ts_files < <(find "$dir" -maxdepth 1 -type f -name "*.ts" ! -name "index.ts" | sort)
10+
mapfile -t ts_files < <(find "$dir" -maxdepth 1 -type f -name "*.ts" ! -name "index.ts" | LC_ALL=C sort)
1111
if [[ ${#ts_files[@]} -eq 0 ]]; then
1212
return
1313
fi
@@ -22,7 +22,7 @@ generate_indices() {
2222
done
2323

2424
local -a subdirs
25-
mapfile -t subdirs < <(find "$dir" -mindepth 1 -maxdepth 1 -type d | sort)
25+
mapfile -t subdirs < <(find "$dir" -mindepth 1 -maxdepth 1 -type d | LC_ALL=C sort)
2626
for subdir in "${subdirs[@]}"; do
2727
generate_indices "$subdir"
2828
done

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ export * from "./Server.js";
44
export * from "./ServerErrorRegistry.js";
55
export * from "./response/index.js";
66
export * from "./routing/index.js";
7+
// test

0 commit comments

Comments
 (0)