Detect arch32 (fix #195)

This commit is contained in:
Roey Darwish Dror
2019-08-17 20:58:54 +03:00
parent 194de969df
commit aed18426f7
2 changed files with 17 additions and 3 deletions

View File

@@ -40,9 +40,11 @@ impl Distribution {
Ok(match (id, id_like) {
(Some("debian"), _) | (_, Some("debian")) | (_, Some("ubuntu")) => Distribution::Debian,
(_, Some("suse")) => Distribution::Suse,
(Some("arch"), _) | (_, Some("archlinux")) | (_, Some("arch")) | (_, Some("anarchylinux")) => {
Distribution::Arch
}
(Some("arch"), _)
| (Some("arch32"), _)
| (_, Some("archlinux"))
| (_, Some("arch"))
| (_, Some("anarchylinux")) => Distribution::Arch,
(Some("centos"), _) | (Some("ol"), _) => Distribution::CentOS,
(Some("fedora"), _) => Distribution::Fedora,
(Some("void"), _) => Distribution::Void,
@@ -350,6 +352,7 @@ mod tests {
#[test]
fn test_arch_linux() {
test_template(&include_str!("os_release/arch"), Distribution::Arch);
test_template(&include_str!("os_release/arch32"), Distribution::Arch);
}
#[test]