From 90cb35db40d91ec784fb7c33ab25f918aa1941d2 Mon Sep 17 00:00:00 2001 From: Hachi-R Date: Mon, 3 Feb 2025 16:50:02 -0300 Subject: [PATCH] fix: improve aria2x download path detection --- scripts/postinstall.cjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/postinstall.cjs b/scripts/postinstall.cjs index 70768a7d..fc3f69dd 100644 --- a/scripts/postinstall.cjs +++ b/scripts/postinstall.cjs @@ -107,7 +107,10 @@ const copyAria2Macos = async () => { }; const copyAria2 = () => { - if (fs.existsSync("aria2")) { + const aria2Path = + process.platform === "win32" ? "aria2/aria2c.exe" : "aria2/aria2c"; + + if (fs.existsSync(aria2Path)) { console.log("Aria2 already exists, skipping download..."); return; }