Skip to content

Commit

Permalink
fix: Pass arguments to monolith and yt-dlp as array for better escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedBassem committed Nov 3, 2024
1 parent 7ec5746 commit cbaa033
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/workers/crawlerWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ async function archiveWebpage(

await execa({
input: html,
})`monolith - -Ije -t 5 -b ${url} -o ${assetPath}`;
})("monolith", ["-", "-Ije", "-t", "5", "-b", url, "-o", assetPath]);

const contentType = "text/html";

Expand Down
2 changes: 1 addition & 1 deletion apps/workers/videoWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async function runWorker(job: DequeuedJob<ZVideoRequest>) {
`[VideoCrawler][${jobId}] Attempting to download a file from "${url}" to "${assetPath}" using the following arguments: "${ytDlpArguments}"`,
);

await execa`yt-dlp ${ytDlpArguments}`;
await execa("yt-dlp", ytDlpArguments);
const downloadPath = await findAssetFile(videoAssetId);
if (!downloadPath) {
logger.info(
Expand Down

0 comments on commit cbaa033

Please sign in to comment.