Skip to content

Commit

Permalink
Document why we wipe the file
Browse files Browse the repository at this point in the history
  • Loading branch information
philmcmahon committed Feb 25, 2025
1 parent ff514eb commit 57aa524
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/media-download/src/yt-dlp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export const downloadMedia = async (
const proxyParams = proxyUrl ? ['--proxy', proxyUrl] : [];
try {
const filepathLocation = `${workingDirectory}/${id}.txt`;
// yt-dlp --print-to-file appends to the file, so wipe it first
fs.writeFileSync(filepathLocation, '');
await runSpawnCommand(
'downloadMedia',
Expand Down

0 comments on commit 57aa524

Please sign in to comment.