Skip to content

Commit 55a3042

Browse files
Detect TTY before assigning stdin
1 parent 91de53a commit 55a3042

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ TARGETS = all build devbuild prodbuild \
2727
.default: all
2828

2929
ifneq (,$(DOCKER))
30+
TTYFLAGS := $(shell if [ -t 0 ] ; then echo "-it"; else echo "-t"; fi)
3031
# Re-run the make command in a container
31-
DKR = docker container run -it --rm \
32+
DKR = docker container run $(TTYFLAGS) --rm \
3233
-v $(CURDIR):/srv/sdk/php:z,delegated \
3334
-v lrn-sdk-php_cache:/root/.composer \
3435
-w /srv/sdk/php \

0 commit comments

Comments
 (0)