Skip to content

Commit 534c84b

Browse files
committed
health: Fix --json crashing with official installer on Ubuntu
1 parent 05c72d6 commit 534c84b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/nix_rs/src/env.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,15 @@ pub enum NixInstaller {
185185
/// The Determinate Systems installer
186186
DetSys(super::detsys_installer::DetSysNixInstaller),
187187
/// Either offical installer or from a different package manager
188-
Other(PathBuf),
188+
Other,
189189
}
190190

191191
impl Display for NixInstaller {
192192
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
193193
match self {
194194
NixInstaller::DetSys(installer) => write!(f, "{}", installer),
195-
NixInstaller::Other(nix_path) => {
196-
write!(f, "Unknown installer for {}", nix_path.display())
195+
NixInstaller::Other => {
196+
write!(f, "Unknown installer")
197197
}
198198
}
199199
}
@@ -204,7 +204,7 @@ impl NixInstaller {
204204
pub fn detect() -> Result<Self, NixEnvError> {
205205
match super::detsys_installer::DetSysNixInstaller::detect()? {
206206
Some(installer) => Ok(NixInstaller::DetSys(installer)),
207-
None => Ok(NixInstaller::Other(which("nix")?)),
207+
None => Ok(NixInstaller::Other),
208208
}
209209
}
210210
}

0 commit comments

Comments
 (0)