From 743310d6805761b8c1c453d7c3f06a8e3c05daeb Mon Sep 17 00:00:00 2001 From: david-scarratt-lrn Date: Tue, 14 May 2024 16:32:34 +1000 Subject: [PATCH] Detect TTY before assigning stdin --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 381a61d..309b611 100644 --- a/Makefile +++ b/Makefile @@ -27,8 +27,9 @@ TARGETS = all build devbuild prodbuild \ .default: all ifneq (,$(DOCKER)) +TTYFLAGS := $(shell if [ -t 0 ] ; then echo "-it"; else echo "-t"; fi) # Re-run the make command in a container -DKR = docker container run -it --rm \ +DKR = docker container run $(TTYFLAGS) --rm \ -v $(CURDIR):/srv/sdk/php:z,delegated \ -v lrn-sdk-php_cache:/root/.composer \ -w /srv/sdk/php \