Only run docker in interactive mode when stdin is a terminal

This commit is contained in:
Erik Flodin 2020-12-30 12:52:36 +01:00
parent a9d9e89d0c
commit 44de30374f
No known key found for this signature in database
GPG Key ID: 420A7C865EE3F85F
1 changed files with 5 additions and 1 deletions

View File

@ -94,7 +94,11 @@ test:
py.test -v $(testargs); \
else \
$(MAKE) -s require-docker && \
docker run --rm -it -v "$(CURDIR):/yadm:ro" $(IMAGE) make test testargs="$(testargs)"; \
docker run \
--rm -t$(shell test -t 0 && echo i) \
-v "$(CURDIR):/yadm:ro" \
$(IMAGE) \
make test testargs="$(testargs)"; \
fi
.PHONY: .testyadm