Description
BeetsTagger.bash line 49 uses find "$1" -type f -iname "*.flac" | read to test whether any FLAC files exist. The read builtin closes the pipe after consuming one line, sending SIGPIPE to find before it finishes traversing the directory. This produces log noise on every BeetsTagger run:
[Error] BeetsTagger.bash: find: 'standard output': Broken pipe
[Error] BeetsTagger.bash: find: write error
Fix
Replace find ... | read with find ... | grep -q .:
# Before
if find "$1" -type f -iname "*.flac" | read; then
# After
if find "$1" -type f -iname "*.flac" | grep -q .; then
grep -q . exits 0 if any output exists (equivalent to the original intent) without closing the pipe early.
This is the same class of broken pipe as the jq | head -n1 issue in the Connect scripts.
Description
BeetsTagger.bashline 49 usesfind "$1" -type f -iname "*.flac" | readto test whether any FLAC files exist. Thereadbuiltin closes the pipe after consuming one line, sending SIGPIPE tofindbefore it finishes traversing the directory. This produces log noise on every BeetsTagger run:Fix
Replace
find ... | readwithfind ... | grep -q .:grep -q .exits 0 if any output exists (equivalent to the original intent) without closing the pipe early.This is the same class of broken pipe as the
jq | head -n1issue in the Connect scripts.