bad patch for panic on mis configured shell
This commit is contained in:
parent
dc120c1e05
commit
523e565b9b
1 changed files with 14 additions and 1 deletions
|
@ -91,7 +91,20 @@ impl TerminalConnection {
|
||||||
let term = Arc::new(FairMutex::new(term));
|
let term = Arc::new(FairMutex::new(term));
|
||||||
|
|
||||||
//Setup the pty...
|
//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
|
//And connect them together
|
||||||
let event_loop = EventLoop::new(
|
let event_loop = EventLoop::new(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue