Skip to content

Commit

Permalink
don't turn off standard input
Browse files Browse the repository at this point in the history
  • Loading branch information
mongolyy committed Jan 25, 2024
1 parent f857637 commit 4ef4bef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 \
Expand All @@ -64,6 +65,7 @@ else
-level="${INPUT_LEVEL}" \
${INPUT_REVIEWDOG_FLAGS}
fi
cat "$tempfile"

exit_code=$?
echo '::endgroup::'
Expand Down

0 comments on commit 4ef4bef

Please sign in to comment.