This is mainly for solving the issue that on Windows, filename is case-insensitive, but when rustup is called with non-lowercased name, it sometimes fails to handle correctly.
e.g. when you call rustc.EXE rather than rustc.exe, it would report
error: command failed: 'rustc.EXE'
info: caused by: The system cannot find the file specified. (os error 2)
and if you call it RustUp, it would report
error: infinite recursion detected
Although this is mostly a Windows-only issue, I guess it doesn't harm much if we extend this behavior to all platforms, which makes the code simpler.
I tried to write a test, but it seems I cannot test the rustc.EXE case in test, because rustup_mock::clitools::cmd attaches the executable suffix unconditionally.