1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 09:04:12 +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

@ -13,7 +13,7 @@ jobs:
- name: musl-tools
run: |
sudo apt-get install musl-tools
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable

1
Cargo.lock generated
View file

@ -544,6 +544,7 @@ name = "haze"
version = "1.2.1"
dependencies = [
"async-trait",
"atty",
"bollard",
"camino",
"directories-next",

View file

@ -33,6 +33,7 @@ tracing = "0.1.37"
tracing-subscriber = "0.3.16"
hyper-reverse-proxy = { version = "0.5.2-dev", git = "https://github.com/felipenoris/hyper-reverse-proxy" }
hyper = "0.14.24"
atty = "0.2.14"
[profile.release]
lto = true

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?;