aboutsummaryrefslogtreecommitdiff
path: root/src/tty.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tty.rs')
-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
};