From 9d093133c3de407144628482e553567de5bd992e Mon Sep 17 00:00:00 2001 From: Son Pham Date: Sun, 9 Mar 2025 00:10:55 +0700 Subject: [PATCH] fix(cursor_setup): ensure consistent locale for MB conversion - Added LC_NUMERIC=C to convert_to_mb() function - Prevents potential locale-related formatting issues - Ensures consistent decimal point representation during file size conversion --- cursor_setup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cursor_setup.sh b/cursor_setup.sh index 8a2bc8f..e7eb5ae 100755 --- a/cursor_setup.sh +++ b/cursor_setup.sh @@ -130,7 +130,9 @@ extract_version() { echo "Error: No version found in filename" >&2; return 1 } -convert_to_mb() { printf "%.2f MB" "$(bc <<< "scale=2; $1 / 1048576")"; } +convert_to_mb() { + LC_NUMERIC=C printf "%.2f MB" "$(bc <<< "scale=2; $1 / 1048576")" +} spinner() { local title="$1" command="$2" chars="|/-\\" i=0