🎨 Update system version retrieval in error.html to use process.getSystemVersion for better accuracy (#17449)

This commit is contained in:
Jeffrey Chen 2026-04-10 17:08:03 +08:00 committed by GitHub
parent 3247c43564
commit 2e4c49151f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -240,9 +240,10 @@
'win32': 'Windows',
'linux': 'Linux'
}[process.platform] || process.platform;
const release = typeof process.getSystemVersion === 'function'
? process.getSystemVersion() // Electron 提供,系统版本
: os.release(); // Node.js 提供,内核版本
// Windows 系统版本判断
const release = os.release();
if (process.platform === 'win32') {
const versionParts = release.split('.'); // 10.0.22000
if (versionParts.length >= 3) {