Skip to content

Commit

Permalink
Auto merge of #169 - pitkley:docker-no-pseudo-tty, r=japaric
Browse files Browse the repository at this point in the history
Don't allocate a pseudo-TTY

This fixes issue #52 as far as I can tell.

Since documentation on the Docker `-t` flag is rather sparse, I am not sure if this has any negative implications on existing usage of cross.

From my arguably limited tests, I have [confirmed](https://gist.github.com/pitkley/c581f612225688937cc8b7f3a7deff9a) that `echo hello | cross run` works. Furthermore, this enables me to run `cross build` in a Gitlab CI job, which otherwise also failed with the error mentioned in #52: `the input device is not a TTY`.
  • Loading branch information
homunkulus committed Feb 17, 2018
2 parents 5f04770 + 974d8c6 commit f85aca9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/docker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub fn register(target: &Target, verbose: bool) -> Result<()> {
docker_command("run")
.arg("--privileged")
.arg("--rm")
.arg("-it")
.arg("-i")
.arg("ubuntu:16.04")
.args(&["sh", "-c", cmd])
.run(verbose)
Expand Down Expand Up @@ -139,7 +139,7 @@ pub fn run(target: &Target,
.args(&["-v", &format!("{}:/rust:ro", rustc::sysroot(verbose)?.display())])
.args(&["-v", &format!("{}:/target", target_dir.display())])
.args(&["-w", "/project"])
.args(&["-it", &image(toml, target)?])
.args(&["-i", &image(toml, target)?])
.args(&["sh", "-c", &format!("PATH=$PATH:/rust/bin {:?}", cmd)])
.run_and_get_status(verbose)
}
Expand Down

0 comments on commit f85aca9

Please sign in to comment.