From 4d61b8586da792be858b6291af34febc6114d53a Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Wed, 29 May 2024 19:55:37 -0300 Subject: [PATCH] use node fs --- postinstall.cjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/postinstall.cjs b/postinstall.cjs index d73b9ad0..2b793257 100644 --- a/postinstall.cjs +++ b/postinstall.cjs @@ -37,9 +37,9 @@ const downloadAria2 = async () => { } else { await exec(`tar --zstd -xvf ${file} usr/bin/aria2c`); console.log("Extracted. Copying binary file..."); - await exec(`mkdir aria2`); - await exec(`cp ./usr/bin/aria2c ./aria2/aria2c`); - await exec(`rm -r ./usr`); + fs.mkdirSync("aria2"); + fs.copyFileSync("usr/bin/aria2c", "aria2/aria2c"); + fs.rmSync("usr", { recursive: true }); } console.log(`Extracted ${file}, removing compressed downloaded file...`);