feature(exec): implement tty support (fixes #335) (#336)

This commit is contained in:
Alex Zenla
2024-08-14 12:45:59 -07:00
committed by GitHub
parent 87530edf70
commit bf3b73bf24
13 changed files with 350 additions and 166 deletions

View File

@ -226,6 +226,7 @@ impl ControlService for DaemonControlService {
.collect(),
command: task.command,
working_directory: task.working_directory,
tty: task.tty,
})),
})),
};
@ -243,11 +244,12 @@ impl ControlService for DaemonControlService {
}.into());
if let Ok(update) = update {
if !update.data.is_empty() {
if !update.stdin.is_empty() {
let _ = handle.update(IdmRequest {
request: Some(IdmRequestType::ExecStream(ExecStreamRequestUpdate {
update: Some(Update::Stdin(ExecStreamRequestStdin {
data: update.data,
data: update.stdin,
closed: update.stdin_closed,
})),
}))}).await;
}
@ -263,7 +265,7 @@ impl ControlService for DaemonControlService {
error: update.error,
exit_code: update.exit_code,
stdout: update.stdout,
stderr: update.stderr
stderr: update.stderr,
};
yield reply;
},