Skip to content

Commit

Permalink
Trim git status before marking plugin as dirty.
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-kast committed May 17, 2022
1 parent 0f08a4c commit 7415bda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/geyser-rabbitmq/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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"
Expand Down

0 comments on commit 7415bda

Please sign in to comment.