1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 17:14:08 +02:00

forward tty status to exec/occ

This commit is contained in:
Robin Appelman 2023-04-28 17:10:13 +02:00
commit 9f8a3b1be8
5 changed files with 9 additions and 5 deletions

View file

@ -113,7 +113,7 @@ pub async fn exec<S1: AsRef<str>, S2: Into<String>>(
attach_stdout: Some(true),
attach_stderr: Some(true),
env: Some(env),
tty: Some(true),
tty: Some(false),
..Default::default()
};
let message = docker

View file

@ -105,7 +105,7 @@ async fn main() -> Result<()> {
} else {
command
},
true,
atty::is(atty::Stream::Stdout),
)
.await?;
}
@ -120,7 +120,7 @@ async fn main() -> Result<()> {
} else {
command
},
true,
atty::is(atty::Stream::Stdout),
)
.await?;
}
@ -132,7 +132,9 @@ async fn main() -> Result<()> {
} => {
let cloud = Cloud::get_by_filter(&mut docker, filter, &config).await?;
command.insert(0, "occ".to_string());
cloud.exec(&mut docker, command, true).await?;
cloud
.exec(&mut docker, command, atty::is(atty::Stream::Stdout))
.await?;
}
HazeArgs::Db { filter, root } => {
let cloud = Cloud::get_by_filter(&mut docker, filter, &config).await?;