From 7cea0b8ab5c0e5315431a10a6ace903b4acb34c5 Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Tue, 14 Jan 2025 13:35:32 +0000 Subject: [PATCH] fix(scripts/develop.sh): silence output if stdout is not a TTY --- scripts/coder-dev.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/coder-dev.sh b/scripts/coder-dev.sh index fa1f4bf2df08f..f475a124f2c05 100755 --- a/scripts/coder-dev.sh +++ b/scripts/coder-dev.sh @@ -39,7 +39,13 @@ case $BINARY_TYPE in coder-slim) # Ensure the coder slim binary is always up-to-date with local # changes, this simplifies usage of this script for development. - make -j "${RELATIVE_BINARY_PATH}" + # NOTE: we send all output of `make` to /dev/null so that we do not break + # scripts that read the output of this command. + if [[ -t 1 ]]; then + make -j "${RELATIVE_BINARY_PATH}" + else + make -j "${RELATIVE_BINARY_PATH}" >/dev/null 2>&1 + fi ;; coder) if [[ ! -x "${CODER_DEV_BIN}" ]]; then