Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd7809ec

Browse files
authored
fix(scripts/coder-dev.sh): silence output if stdout is not a TTY (#16131)
The `make -j` output was sometimes emitting non-JSON output from `gogenerate`, resulting in errors like the below:```++ /home/coder/src/coder/coder/scripts/coder-dev.sh organizations show me -o json++ jq -r '.[] | select(.is_default) | .name'parse error: Invalid numeric literal at line 1, column 3```This PR modifies `coder-dev.sh` to silence the output of `make` if theoutput is not a TTY.
1 parent473fcc3 commitd7809ec

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎scripts/coder-dev.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,13 @@ case $BINARY_TYPE in
3939
coder-slim)
4040
# Ensure the coder slim binary is always up-to-date with local
4141
# changes, this simplifies usage of this script for development.
42-
make -j"${RELATIVE_BINARY_PATH}"
42+
# NOTE: we send all output of `make` to /dev/null so that we do not break
43+
# scripts that read the output of this command.
44+
if [[-t 1 ]];then
45+
make -j"${RELATIVE_BINARY_PATH}"
46+
else
47+
make -j"${RELATIVE_BINARY_PATH}">/dev/null2>&1
48+
fi
4349
;;
4450
coder)
4551
if [[!-x"${CODER_DEV_BIN}" ]];then

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp