Skip to content

Commit 878704a

Browse files
committed
Adjust Makefile to detect TTY input for 'docker run' command
Signed-off-by: Mike Dougherty <[email protected]>
1 parent ee28632 commit 878704a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
1616
LIBCOMPOSE_IMAGE := libcompose-dev$(if $(GIT_BRANCH),:$(GIT_BRANCH))
1717

1818
DAEMON_VERSION := $(if $(DAEMON_VERSION),$(DAEMON_VERSION),"default")
19-
DOCKER_RUN_LIBCOMPOSE := docker run --rm -it --privileged -e DAEMON_VERSION="$(DAEMON_VERSION)" $(LIBCOMPOSE_ENVS) $(LIBCOMPOSE_MOUNT) "$(LIBCOMPOSE_IMAGE)"
19+
TTY := $(shell [ -t 0 ] && echo "-t")
20+
DOCKER_RUN_LIBCOMPOSE := docker run --rm -i $(TTY) --privileged -e DAEMON_VERSION="$(DAEMON_VERSION)" $(LIBCOMPOSE_ENVS) $(LIBCOMPOSE_MOUNT) "$(LIBCOMPOSE_IMAGE)"
2021

2122
default: binary
2223

0 commit comments

Comments
 (0)