#![cfg(unix)]
use crate::error::{ComposeError, Result};
use crate::libpod::{urlencoded, API_PREFIX};
use super::Engine;
impl Engine {
pub(super) async fn exec_interactive(&self, exec_id: &str) -> Result<()> {
let start_path = format!("{API_PREFIX}/exec/{}/start", urlencoded(exec_id));
let body = br#"{"Detach":false,"Tty":true}"#;
let hijacked = self
.client
.post_hijack(&start_path, body)
.await
.map_err(ComposeError::Podman)?;
self.pump_terminal(hijacked, &format!("exec/{}", urlencoded(exec_id)))
.await
}
}