Rollup merge of #146738 - beepster4096:widnows, r=jieyouxu

Fix tidy spellchecking on Windows

Tidy should now check for executable with the right extension for the platform when installing tools
This commit is contained in:
Stuart Cook 2025-09-19 22:31:55 +10:00 committed by GitHub
commit a2c7008e15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -237,7 +237,7 @@ pub fn ensure_version_or_cargo_install(
if !cargo_exit_code.success() {
return Err(io::Error::other("cargo install failed"));
}
let bin_path = tool_bin_dir.join(bin_name);
let bin_path = tool_bin_dir.join(bin_name).with_extension(env::consts::EXE_EXTENSION);
assert!(
matches!(bin_path.try_exists(), Ok(true)),
"cargo install did not produce the expected binary"