Detect arch32 (fix #195)
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user