Skip to content

Commit 87852f0

Browse files
Merge #964
964: Do not keep stdin open when running containers. r=Emilgardis a=Alexhuszagh Co-authored-by: Alex Huszagh <[email protected]>
2 parents 29d1f90 + 18c2b9c commit 87852f0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.changes/964.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "fixed",
3+
"description": "don't keep stdin open when running containers."
4+
}

src/docker/local.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,8 @@ pub(crate) fn run(
101101
]);
102102
}
103103

104-
if io::Stdin::is_atty() {
105-
docker.arg("-i");
106-
if io::Stdout::is_atty() && io::Stderr::is_atty() {
107-
docker.arg("-t");
108-
}
104+
if io::Stdin::is_atty() && io::Stdout::is_atty() && io::Stderr::is_atty() {
105+
docker.arg("-t");
109106
}
110107
let mut image_name = options.image.name.clone();
111108
if options.needs_custom_image() {

0 commit comments

Comments
 (0)