Skip to content

Commit

Permalink
Still consume input when processing output with a nop filter.
Browse files Browse the repository at this point in the history
Because stated reasons.
  • Loading branch information
danfuzz committed Aug 22, 2023
1 parent 20cd3e1 commit b2fc905
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/lib/bashy-basics/_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ function jpostproc {
fi

if (( $# == 0 )) && [[ ${outputStyle} == 'none' ]]; then
# No need to run a nop-filter just to not produce output.
# No need to run a nop-filter just to not-produce output. That said,
# because whatever is feeding into this nop-filter _might_ want to write
# and _might_ get unhappy if it finds its input closed (looking at you
# `jq`), we still `cat` the input and just drop it on the floor.
cat >/dev/null
return
fi

Expand Down

0 comments on commit b2fc905

Please sign in to comment.