fix: add condition for existence of `current_dir`
@@ -113,8 +113,10 @@ fn handle_openpty(
let mut child = unsafe {
let command = &mut Command::new(cmd.command);
if let Some(current_dir) = cmd.cwd {
+ if current_dir.exists() {
command.current_dir(current_dir);
}
+ }
command
.args(&cmd.args)
.pre_exec(move || -> std::io::Result<()> {
