diff --git a/crates/nix_health/src/check/direnv.rs b/crates/nix_health/src/check/direnv.rs index 7f33e482..18ec27b2 100644 --- a/crates/nix_health/src/check/direnv.rs +++ b/crates/nix_health/src/check/direnv.rs @@ -155,7 +155,8 @@ fn direnv_version() -> anyhow::Result { .output()?; if output.status.success() { let out = String::from_utf8_lossy(&output.stdout); - Ok(out.to_string()) + let trimmed_out = out.trim(); + Ok(trimmed_out.to_string()) } else { anyhow::bail!("Unable to run direnv --version: {:?}", output.stderr) }