Panic on unrecognized OS
This commit is contained in:
parent
16595a6c20
commit
08f4125fff
|
@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue