execute container exec waits a bit for terminal to init before sending command

This commit is contained in:
mbecker20
2025-09-23 01:38:05 -07:00
parent 4674b2badb
commit 24adb89d25

View File

@@ -1,4 +1,4 @@
use std::sync::Arc;
use std::{sync::Arc, time::Duration};
use anyhow::{Context, anyhow};
use axum::http::StatusCode;
@@ -212,6 +212,9 @@ impl Resolve<super::Args> for ExecuteContainerExec {
.await
.context("Failed to create terminal for container exec")?;
// Wait a bit for terminal to initialize
tokio::time::sleep(Duration::from_millis(500)).await;
let stdout =
setup_execute_command_on_terminal(&terminal, &command).await?;