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,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<()> {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue