1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-25 14:05:41 -05: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 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
};