mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-26 00:52:18 +03:00
shouldSkipCloudSyncInitialization(env, argv) forwarded its own parameters in the wrong order to isAutomatedTestProcess(argv, env) — passing env where argv is expected and vice versa. Any real argv array landed in the `env` position (harmless there) but the env object landed in the `argv` position, and argv.some() then threw `TypeError: argv.some is not a function` as soon as a caller passed an explicit, correctly-ordered argv/env pair (tests/unit/model-sync- scheduler.test.ts "initCloudSync skips auto initialization..."). Fixed the call-site argument order. Also hardened isAutomatedTestProcess() to tolerate a non-array argv defensively (return false instead of throwing) since this check gates production background-task startup (auto-backup, migrations, cloud sync) and must never crash the process it's protecting.
3.0 KiB
3.0 KiB