From 4ef4bef836825c52e95c6e86d1d5c8a909bee0cd Mon Sep 17 00:00:00 2001 From: mongolyy Date: Thu, 18 Jan 2024 21:53:14 +0900 Subject: [PATCH] don't turn off standard input --- script.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/script.sh b/script.sh index 2745276..686b3c7 100755 --- a/script.sh +++ b/script.sh @@ -21,9 +21,10 @@ fi echo "Biome $("$(npm root)"/.bin/biome --version)" echo '::group:: Running Biome with reviewdog 🐶 ...' +tempfile=$(mktemp) if [ "$INPUT_REPORTER" = "github-pr-review" ]; then # shellcheck disable=SC2086 - "$(npm root)"/.bin/biome check --apply ${INPUT_BIOME_FLAGS} 2>&1 1>/dev/null | + "$(npm root)"/.bin/biome check --apply ${INPUT_BIOME_FLAGS} 2>&1 >$tempfile | sed 's/ *$//' | awk 'BEGIN { RS=""; ORS="\n\n" } { if (index($0, "│") > 0) { print " ```\n" $0 "\n ```" } else { print $0 } }' | reviewdog \ @@ -44,7 +45,7 @@ if [ "$INPUT_REPORTER" = "github-pr-review" ]; then ${INPUT_REVIEWDOG_FLAGS} else # shellcheck disable=SC2086 - "$(npm root)"/.bin/biome ci --max-diagnostics=30 ${INPUT_BIOME_FLAGS} 2>&1 1>/dev/null | + "$(npm root)"/.bin/biome ci --max-diagnostics=30 ${INPUT_BIOME_FLAGS} 2>&1 >$tempfile | sed 's/ *$//' | awk 'BEGIN { RS=""; ORS="\n\n" } { if (index($0, "│") > 0) { print " ```\n" $0 "\n ```" } else { print $0 } }' | reviewdog \ @@ -64,6 +65,7 @@ else -level="${INPUT_LEVEL}" \ ${INPUT_REVIEWDOG_FLAGS} fi +cat "$tempfile" exit_code=$? echo '::endgroup::'