diff --git a/crates/terminal/src/connection.rs b/crates/terminal/src/connection.rs index 5941dc506ed2bda09a9a6ea74e2ddc424c5b9754..6eed882e2d47a431598963d272f10b0dca7f8a76 100644 --- a/crates/terminal/src/connection.rs +++ b/crates/terminal/src/connection.rs @@ -91,7 +91,20 @@ impl TerminalConnection { let term = Arc::new(FairMutex::new(term)); //Setup the pty... - let pty = tty::new(&pty_config, &initial_size, None).expect("Could not create tty"); + let pty = { + if let Some(pty) = tty::new(&pty_config, &initial_size, None).ok() { + pty + } else { + let pty_config = PtyConfig { + shell: None, + working_directory: working_directory.clone(), + ..Default::default() + }; + + tty::new(&pty_config, &initial_size, None) + .expect("Failed with default shell too :(") + } + }; //And connect them together let event_loop = EventLoop::new(