Panic on unrecognized OS

This commit is contained in:
lilith 2022-10-08 22:57:55 -04:00
parent 16595a6c20
commit 08f4125fff
1 changed files with 3 additions and 2 deletions

View File

@ -47,9 +47,10 @@ fn get_login_shell(config: Config) -> String {
config.system.shell
} else {
match std::env::consts::OS {
"linux" | "openbsd" | "netbsd" | "dragonfly" | "solaris" | "macos" =>
std::env::var("SHELL").unwrap_or("/bin/sh".to_string()),
"windows" => r#"C:\Windows\System32\cmd.exe"#.to_string(),
"linux" | "openbsd" | "netbsd" | "dragonfly" | "solaris" | "macos" | _ =>
std::env::var("SHELL").unwrap_or("/bin/sh".to_string())
_ => unimplemented!("Unrecognized operating system; cannot get user's shell")
}
}
}