Finished graceful terminal failure

This commit is contained in:
Mikayla Maki 2022-07-16 10:34:47 -07:00
parent 40d30a898b
commit 4a483618be
4 changed files with 16 additions and 11 deletions

View file

@ -17,6 +17,7 @@ use project::{LocalWorktree, Project, ProjectPath};
use settings::{Settings, WorkingDirectory};
use smallvec::SmallVec;
use std::path::{Path, PathBuf};
use util::ResultExt;
use workspace::{Item, Workspace};
use crate::terminal_element::TerminalEl;
@ -157,7 +158,7 @@ impl Terminal {
///Create a new Terminal in the current working directory or the user's home directory
fn deploy(workspace: &mut Workspace, _: &Deploy, cx: &mut ViewContext<Workspace>) {
let wd = get_wd_for_workspace(workspace, cx);
if let Some(view) = cx.add_option_view(|cx| Terminal::new(wd, false, cx).ok()) {
if let Some(view) = cx.add_option_view(|cx| Terminal::new(wd, false, cx).log_err()) {
workspace.add_item(Box::new(view), cx);
}
}