Don't bless outdated files on windows
This commit is contained in:
parent
4992548f28
commit
7ed29c0051
@ -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()
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user