Update manager.ts

This commit is contained in:
pompurin404 2024-08-04 10:15:23 +08:00
parent 12504704a3
commit 454ce10a9d
No known key found for this signature in database

View File

@ -17,9 +17,6 @@ export function startCore(): void {
generateProfile()
checkProfile()
stopCore()
if (process.platform !== 'win32') {
execSync(`chmod +x ${corePath}`)
}
child = spawn(corePath, ['-d', mihomoWorkDir()])
child.stdout?.on('data', (data) => {
fs.writeFileSync(
@ -52,9 +49,5 @@ export function restartCore(): void {
export function checkProfile(): void {
const corePath = mihomoCorePath(getAppConfig().core ?? 'mihomo')
if (process.platform !== 'win32') {
execSync(`chmod +x ${corePath}`)
}
execFileSync(corePath, ['-t', '-f', mihomoWorkConfigPath(), '-d', mihomoTestDir()])
}