Skip to content

Commit

Permalink
Fix call to docker-compose exec in integration test.
Browse files Browse the repository at this point in the history
Calls to docker-compose exec in Windows need the -T option (to disable
pseudo-tty allocation, which doesn't work in Windows without something
like winpty).

This commit adds the -T option to all calls to docker-compose exec.
  • Loading branch information
Sam Wright committed Mar 1, 2017
1 parent 3dae325 commit 335c156
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ private Version version() throws IOException, InterruptedException {
private static String[] constructFullDockerComposeExecArguments(DockerComposeExecOption dockerComposeExecOption,
String containerName, DockerComposeExecArgument dockerComposeExecArgument) {
ImmutableList<String> fullArgs = new ImmutableList.Builder<String>().add("exec")
.add("-T")
.addAll(dockerComposeExecOption.options())
.add(containerName)
.addAll(dockerComposeExecArgument.arguments())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public void pass_concatenated_arguments_to_executor_on_docker_compose_exec()
throws IOException, InterruptedException {
when(executedProcess.getInputStream()).thenReturn(toInputStream("docker-compose version 1.7.0rc1, build 1ad8866"));
compose.exec(options("-d"), "container_1", arguments("ls"));
verify(executor, times(1)).execute("exec", "-d", "container_1", "ls");
verify(executor, times(1)).execute("exec", "-T", "-d", "container_1", "ls");
}

@Test
Expand Down

0 comments on commit 335c156

Please sign in to comment.