aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHonza Pokorny <me@honza.ca>2017-01-07 08:43:58 -0400
committerHonza Pokorny <me@honza.ca>2017-01-07 08:43:58 -0400
commit7ed4f205ad86501c86f1f51533170bed187f7b8f (patch)
tree37e27bc3d5cff7e12ed96bab41a3a784128f869f
parenta01ef5568fcae92f420dd9314d916b80e2507ff8 (diff)
downloadalacritty-7ed4f205ad86501c86f1f51533170bed187f7b8f.tar.gz
alacritty-7ed4f205ad86501c86f1f51533170bed187f7b8f.zip
Avoid unwrap when determining proper shell to use
-rw-r--r--src/tty.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tty.rs b/src/tty.rs
index 78e2a8ff..ad89397d 100644
--- a/src/tty.rs
+++ b/src/tty.rs
@@ -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
};