fix(pty): do not crash when unable to set cwd (#2214)
* fix(pty): do not crash when unable to set cwd * style(fmt): rustfmt
This commit is contained in:
parent
fd19174471
commit
91b94552b6
1 changed files with 2 additions and 4 deletions
|
|
@ -174,12 +174,10 @@ fn handle_openpty(
|
||||||
if current_dir.exists() && current_dir.is_dir() {
|
if current_dir.exists() && current_dir.is_dir() {
|
||||||
command.current_dir(current_dir);
|
command.current_dir(current_dir);
|
||||||
} else {
|
} else {
|
||||||
// TODO: propagate this to the user
|
log::error!(
|
||||||
return Err(anyhow!(
|
|
||||||
"Failed to set CWD for new pane. '{}' does not exist or is not a folder",
|
"Failed to set CWD for new pane. '{}' does not exist or is not a folder",
|
||||||
current_dir.display()
|
current_dir.display()
|
||||||
))
|
);
|
||||||
.context("failed to open PTY");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
command
|
command
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue