diff options
author | Honza Pokorny <me@honza.ca> | 2017-01-07 08:43:58 -0400 |
---|---|---|
committer | Honza Pokorny <me@honza.ca> | 2017-01-07 08:43:58 -0400 |
commit | 7ed4f205ad86501c86f1f51533170bed187f7b8f (patch) | |
tree | 37e27bc3d5cff7e12ed96bab41a3a784128f869f | |
parent | a01ef5568fcae92f420dd9314d916b80e2507ff8 (diff) | |
download | alacritty-7ed4f205ad86501c86f1f51533170bed187f7b8f.tar.gz alacritty-7ed4f205ad86501c86f1f51533170bed187f7b8f.zip |
Avoid unwrap when determining proper shell to use
-rw-r--r-- | src/tty.rs | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 }; |