1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2025-07-31 22:03:40 -04:00

Avoid unwrap when determining proper shell to use

This commit is contained in:
Honza Pokorny 2017-01-07 08:43:58 -04:00
parent a01ef5568f
commit 7ed4f205ad

View file

@ -208,7 +208,10 @@ fn execsh(config: &Config) -> ! {
let pw = get_pw_entry(&mut buf); let pw = get_pw_entry(&mut buf);
let shell = match config.shell() { let shell = match config.shell() {
Some(shell) => shell.to_str().unwrap(), Some(shell) => match shell.to_str() {
Some(shell) => shell,
None => die!("Invalid shell value")
},
None => pw.shell None => pw.shell
}; };