Skip to content

Commit

Permalink
fix(pty): do not crash when unable to set cwd (zellij-org#2214)
Browse files Browse the repository at this point in the history
* fix(pty): do not crash when unable to set cwd

* style(fmt): rustfmt
  • Loading branch information
imsnif authored and naosense committed Mar 2, 2023
1 parent d72deb9 commit d5aadd0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions zellij-server/src/os_input_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,10 @@ fn handle_openpty(
if current_dir.exists() && current_dir.is_dir() {
command.current_dir(current_dir);
} else {
// TODO: propagate this to the user
return Err(anyhow!(
log::error!(
"Failed to set CWD for new pane. '{}' does not exist or is not a folder",
current_dir.display()
))
.context("failed to open PTY");
);
}
}
command
Expand Down

0 comments on commit d5aadd0

Please sign in to comment.