fix: add condition for existence of current_dir (#995)
This commit is contained in:
parent
690af2e33d
commit
d2cfcb3bab
1 changed files with 3 additions and 1 deletions
|
|
@ -113,7 +113,9 @@ fn handle_openpty(
|
|||
let mut child = unsafe {
|
||||
let command = &mut Command::new(cmd.command);
|
||||
if let Some(current_dir) = cmd.cwd {
|
||||
command.current_dir(current_dir);
|
||||
if current_dir.exists() {
|
||||
command.current_dir(current_dir);
|
||||
}
|
||||
}
|
||||
command
|
||||
.args(&cmd.args)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue