From d3d4b4935bb90039606f752ce98473de7a377dfd Mon Sep 17 00:00:00 2001 From: Philipp Krones Date: Thu, 2 May 2024 21:08:24 +0200 Subject: [PATCH] fixup! Josh preparations --- clippy_dev/src/sync.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/clippy_dev/src/sync.rs b/clippy_dev/src/sync.rs index 982fb757f04b..0f08f143c44a 100644 --- a/clippy_dev/src/sync.rs +++ b/clippy_dev/src/sync.rs @@ -63,18 +63,19 @@ fn rustc_version() -> String { let version = String::from_utf8( process::Command::new("rustc") .arg("--version") + .arg("--verbose") .output() .expect("failed to run rustc") .stdout, ) .unwrap(); version - .rsplit_once('(') - .unwrap() - .1 + .lines() + .find(|line| line.starts_with("commit-hash:")) + .expect("failed to parse `rustc -vV`") .split_whitespace() - .next() - .expect("failed to get commit from `rustc --version`") + .nth(1) + .expect("failed to get commit from `rustc -vV`") .to_string() }