-
-
Notifications
You must be signed in to change notification settings - Fork 104
[BUG] [Lidarr] BeetsTagger broken pipe: find piped to read causes SIGPIPE #411
Copy link
Copy link
Open
Description
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 .; thengrep -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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels