Skip to content

Commit c24f353

Browse files
committed
rustup: Fix for locale bug
Since `tr` converts lowercase to uppercase according to system locale using `LC_CTYPE` environment variable; on some locales, rustup.sh fails to use correct variables names, thus deletes temporarily downloaded files and gives a meaningless error as shown below. This a simple fix which explictly sets `LC_CTYPE` as `C`.
1 parent e4e7aa2 commit c24f353

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/etc/rustup.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ create_tmp_dir() {
241241
echo $TMP_DIR
242242
}
243243

244+
# Make `tr` locale independent
245+
LC_CTYPE=C
246+
244247
probe_need CFG_CURL curl
245248
probe_need CFG_TAR tar
246249
probe_need CFG_FILE file

0 commit comments

Comments
 (0)