diff --git a/server/helpers/youtube-dl.ts b/server/helpers/youtube-dl.ts index 9e8ef90d8..74e5f896c 100644 --- a/server/helpers/youtube-dl.ts +++ b/server/helpers/youtube-dl.ts @@ -170,7 +170,12 @@ async function updateYoutubeDLBinary () { return res() } - downloadFile.pipe(createWriteStream(bin, { mode: 493 })) + const writeStream = createWriteStream(bin, { mode: 493 }).on('error', err => { + logger.error('youtube-dl update error in write stream', { err }) + return res() + }) + + downloadFile.pipe(writeStream) }) downloadFile.on('error', err => {