Compare commits

..

1 Commits

Author SHA1 Message Date
NimBold 544247eca1 test(startup): isolate Aria2 launch path (#37) 2026-08-27 20:27:58 +03:30
2 changed files with 11 additions and 12 deletions
+7 -11
View File
@@ -23,21 +23,17 @@ const stabilityMsValue = Number.parseInt(argValue('--stability-ms') || '5000', 1
const stabilityMs = Number.isFinite(stabilityMsValue) && stabilityMsValue >= 0
? Math.min(stabilityMsValue, MAX_STABILITY_MS)
: 5000;
const childEnv = {
...process.env,
FIRELINK_SMOKE_TEST: '1',
FIRELINK_DISABLE_ARIA2_POLLER: '1',
WEBKIT_DISABLE_COMPOSITING_MODE: '1',
GDK_BACKEND: 'x11',
};
if (process.argv.includes('--disable-aria2-poller')) {
childEnv.FIRELINK_DISABLE_ARIA2_POLLER = '1';
}
const READY_PORT_TIMEOUT_MS = 500;
const child = spawn(executable, [], {
cwd: process.env.RUNNER_TEMP || process.env.TMPDIR || process.cwd(),
detached: process.platform !== 'win32',
env: childEnv,
env: {
...process.env,
FIRELINK_SMOKE_TEST: '1',
FIRELINK_DISABLE_ARIA2_STARTUP: '1',
WEBKIT_DISABLE_COMPOSITING_MODE: '1',
GDK_BACKEND: 'x11',
},
stdio: ['ignore', 'pipe', 'pipe'],
});
+4 -1
View File
@@ -18628,6 +18628,9 @@ pub fn run() {
let aria2_secret_clone = aria2_secret.clone();
let app_handle_bg = app.handle().clone();
tauri::async_runtime::spawn(async move {
if std::env::var_os("FIRELINK_DISABLE_ARIA2_STARTUP").is_some() {
return;
}
let mut ws_port = 6800;
match resolve_bundled_binary_path(&app_handle_bg, "aria2c") {
@@ -19007,7 +19010,7 @@ pub fn run() {
let poll_secret = aria2_secret.clone();
let poll_mgr = Arc::clone(&queue_manager_poll);
tauri::async_runtime::spawn(async move {
if std::env::var_os("FIRELINK_DISABLE_ARIA2_POLLER").is_some() {
if std::env::var_os("FIRELINK_DISABLE_ARIA2_STARTUP").is_some() {
return;
}
let mut interval = tokio::time::interval(std::time::Duration::from_millis(1000));