Skip to content

Commit

Permalink
fix: systemd version check
Browse files Browse the repository at this point in the history
  • Loading branch information
lleyton committed Jul 5, 2024
1 parent 13c900b commit 83c826b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/backend/l10n.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ pub fn list_langs() -> HashMap<String, (String, String)> {
#[test]
fn test_list_locales() {
let locales = list_locales();
println!("{locales:?}");
assert!(!locales.is_empty());
assert_eq!(list_langs().len(), locales.len());
}
Expand Down
9 changes: 8 additions & 1 deletion src/backend/repart_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use tiffin::{Container, MountTarget};

/// Gets the systemd version
pub fn systemd_version() -> color_eyre::Result<usize> {
let output = std::process::Command::new("systemd")
let output = std::process::Command::new("systemctl")
.arg("--version")
.output()?;
let version = std::str::from_utf8(&output.stdout)?;
Expand Down Expand Up @@ -168,4 +168,11 @@ mod tests {
assert_eq!(mountpoints.get("/boot/efi"), Some(&"/dev/sda1".to_string()));
assert_eq!(mountpoints.get("/"), Some(&"/dev/sda4".to_string()));
}

#[test]
fn get_systemd_version() -> color_eyre::Result<()> {
let version = systemd_version()?;
println!("{}", version);
Ok(())
}
}

0 comments on commit 83c826b

Please sign in to comment.