mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-26 09:02:11 +03:00
Five defects found while validating #7592 on a real packaged Windows build: - optionalPackStaging: GNU tar reads the drive letter in an absolute -f C:\... archive path as a remote rsh host (Cannot connect to C:), failing optional-pack staging on Git-for-Windows machines. Pass a bare filename with cwd at the tarball directory; surface tar stderr. - electron/package.json: lib/loginHeaderCapture.js was missing from the asar files allowlist; loginManager.js requires it top-level, so the packaged main process crashed on launch. - electron-builder >=26 injects !**/node_modules/** into every extraResources pattern list and no positive filter can override it, silently dropping the staged runtime node_modules (including the better-sqlite3 N-API prebuild) from resources/app. Add an afterPack hook (scripts/build/afterpack-copy-node-modules.mjs) that restores it. - smoke harness: Electron resolves userData from %USERPROFILE%/AppData/Roaming/<name> (USERPROFILE wins over APPDATA) and the path service throws when it is missing, so requestSingleInstanceLock() returned false and the app exited(0) silently before whenReady. ensureSmokeEnvDirs now pre-creates the derived tree and is exported for tests. - core.ts: the #7592 guard parses a [DB] Driver: ... line that only the unused openDatabaseAsync() emitted; getDbInstance() now logs the same line on its primary open so the assertion is reachable. Also makes the smoke env-allowlist unit test host-agnostic (it hardcoded POSIX paths) and adds regression tests for the USERPROFILE derived tree and tarPack under Windows-style absolute paths. Closes #7592