mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-16 13:01:14 +00:00
refactor: Random os hostname
This commit is contained in:
parent
a08ec2a4bd
commit
94273d80b0
@ -4,9 +4,9 @@ import path from 'node:path';
|
|||||||
// 缓解Win7设备兼容性问题
|
// 缓解Win7设备兼容性问题
|
||||||
let osName: string;
|
let osName: string;
|
||||||
try {
|
try {
|
||||||
osName = os.hostname();
|
osName = os.hostname();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
osName = "NapCat"
|
osName = 'NapCat ' + crypto.randomUUID().substring(0, 4);
|
||||||
|
|
||||||
}
|
}
|
||||||
export const systemPlatform = os.platform();
|
export const systemPlatform = os.platform();
|
||||||
|
Loading…
Reference in New Issue
Block a user