From 382dc166cc834b51d99f14c270764cf3d85c1069 Mon Sep 17 00:00:00 2001 From: Andrew Koerner Date: Thu, 5 Dec 2024 17:36:31 +0100 Subject: [PATCH] added tty check for adore_cli_run --- adore_cli.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/adore_cli.mk b/adore_cli.mk index e6d99e6..c52d2c2 100644 --- a/adore_cli.mk +++ b/adore_cli.mk @@ -135,7 +135,12 @@ adore_cli_run: make adore_cli_start; \ fi @echo "Executing command in container ${ADORE_CLI_CONTAINER_NAME}: $(cmd)" - docker exec --workdir /tmp/adore -it ${ADORE_CLI_CONTAINER_NAME} zsh -c "source ~/.zshrc && $(cmd)" + @if test -t 1; then \ + docker exec --workdir /tmp/adore -it ${ADORE_CLI_CONTAINER_NAME} zsh -c "source ~/.zshrc && $(cmd)"; \ + else \ + docker exec --workdir /tmp/adore ${ADORE_CLI_CONTAINER_NAME} zsh -c "source ~/.zshrc && $(cmd)"; \ + fi + .PHONY: adore_cli_start_headless