From 07f9e4c7cabd24857a935a4ccc122e74091cbe5a Mon Sep 17 00:00:00 2001 From: Guohan Lu Date: Tue, 29 Dec 2020 14:08:10 -0800 Subject: [PATCH] [build]: setup -t option in docker run correctly use bash -t test flag to check if input device is tty or not Signed-off-by: Guohan Lu --- Makefile.work | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.work b/Makefile.work index 8dcda0eb5676..8703a13d0914 100644 --- a/Makefile.work +++ b/Makefile.work @@ -137,7 +137,7 @@ DOCKER_RUN := docker run --rm=true --privileged --init \ -w $(DOCKER_BUILDER_WORKDIR) \ -e "http_proxy=$(http_proxy)" \ -e "https_proxy=$(https_proxy)" \ - -i$(if $(TERM),t,) \ + -i$(shell { if [ -t 0 ]; then echo t; fi }) \ $(SONIC_BUILDER_EXTRA_CMDLINE) ifneq ($(DOCKER_BUILDER_USER_MOUNT),)