From 7415bdaa5f75954c542c069660138beac350b9fd Mon Sep 17 00:00:00 2001 From: raykast Date: Tue, 17 May 2022 15:59:31 -0700 Subject: [PATCH] Trim git status before marking plugin as dirty. --- crates/geyser-rabbitmq/build.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/geyser-rabbitmq/build.rs b/crates/geyser-rabbitmq/build.rs index fc5aeba9c..d13fc71c1 100644 --- a/crates/geyser-rabbitmq/build.rs +++ b/crates/geyser-rabbitmq/build.rs @@ -84,8 +84,8 @@ fn main() { println!("cargo:rerun-if-changed={}/{}", toplevel, file); } - for file in str::from_utf8(&status.stdout) - .unwrap() + let status = str::from_utf8(&status.stdout).unwrap(); + for file in status .split('\n') .map(|f| f.trim()) .filter(|f| f.len() > 2) @@ -97,7 +97,7 @@ fn main() { println!( "cargo:rustc-env=META_GIT_HEAD={}{}", str::from_utf8(&rev.stdout).unwrap().trim(), - if status.stdout.is_empty() { + if status.trim().is_empty() { "" } else { "-DIRTY"