Don't bless outdated files on windows

This commit is contained in:
Jason Newcomb 2022-01-21 23:11:32 -05:00
parent 4992548f28
commit 7ed29c0051

View File

@ -9,9 +9,14 @@
use crate::clippy_project_root;
#[cfg(not(windows))]
static CARGO_CLIPPY_EXE: &str = "cargo-clippy";
#[cfg(windows)]
static CARGO_CLIPPY_EXE: &str = "cargo-clippy.exe";
static CLIPPY_BUILD_TIME: SyncLazy<Option<std::time::SystemTime>> = SyncLazy::new(|| {
let mut path = std::env::current_exe().unwrap();
path.set_file_name("cargo-clippy");
path.set_file_name(CARGO_CLIPPY_EXE);
fs::metadata(path).ok()?.modified().ok()
});