From b7a61f4567a226d0839fa88b4f75fb8f67e6b75a Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Thu, 6 Jun 2024 12:14:08 -0300 Subject: [PATCH] remove log and undo release change --- .github/workflows/release.yml | 2 +- src/main/services/aria2c.ts | 26 ++++++++++---------------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e9849665..cd91c635 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ jobs: build: strategy: matrix: - os: [windows-latest, ubuntu-latest, macos-latest] + os: [windows-latest, ubuntu-latest] runs-on: ${{ matrix.os }} diff --git a/src/main/services/aria2c.ts b/src/main/services/aria2c.ts index 4557a3ae..b1b1da76 100644 --- a/src/main/services/aria2c.ts +++ b/src/main/services/aria2c.ts @@ -1,26 +1,20 @@ import path from "node:path"; import { spawn } from "node:child_process"; import { app } from "electron"; -import { logger } from "./logger"; export const startAria2 = () => { const binaryPath = app.isPackaged ? path.join(process.resourcesPath, "aria2", "aria2c") : path.join(__dirname, "..", "..", "aria2", "aria2c"); - logger.log("starting aria2 at:", binaryPath); - - const cp = spawn(binaryPath, [ - "--enable-rpc", - "--rpc-listen-all", - "--file-allocation=none", - "--allow-overwrite=true", - ]); - - cp.stdout?.on("data", async (data) => { - const msg = Buffer.from(data).toString("utf-8"); - logger.info(msg); - }); - - return cp; + return spawn( + binaryPath, + [ + "--enable-rpc", + "--rpc-listen-all", + "--file-allocation=none", + "--allow-overwrite=true", + ], + { stdio: "inherit", windowsHide: true } + ); };