fix check failed

This commit is contained in:
pompurin404 2024-08-03 09:09:24 +08:00
parent dd7134c389
commit deeaa5933d
No known key found for this signature in database
3 changed files with 4 additions and 6 deletions

View File

@ -1,4 +1,4 @@
import { ChildProcess, execSync, spawn } from 'child_process'
import { ChildProcess, execFileSync, execSync, spawn } from 'child_process'
import {
logPath,
mihomoCorePath,
@ -50,13 +50,11 @@ export function restartCore(): void {
startCore()
}
// mihomo -t -d path return status code
export function checkProfile(): void {
const corePath = mihomoCorePath(getAppConfig().core ?? 'mihomo')
generateProfile()
if (process.platform !== 'win32') {
execSync(`chmod +x ${corePath}`)
}
execSync(`${corePath} -t -f ${mihomoWorkConfigPath()} -d ${mihomoTestDir()}`)
execFileSync(corePath, ['-t', '-f', mihomoWorkConfigPath(), '-d', mihomoTestDir()])
}

View File

@ -17,7 +17,7 @@ const LogItem: React.FC<IMihomoLogInfo> = (props) => {
</div>
<small className="text-default-500">{time}</small>
</CardHeader>
<CardBody className="pt-0">{payload}</CardBody>
<CardBody className="pt-0 text-sm">{payload}</CardBody>
</Card>
)
}

View File

@ -1,5 +1,5 @@
type OutboundMode = 'rule' | 'global' | 'direct'
type LogLevel = 'info' | 'debug' | 'warn' | 'error' | 'silent'
type LogLevel = 'info' | 'debug' | 'warning' | 'error' | 'silent'
type SysProxyMode = 'auto' | 'manual'
interface IMihomoVersion {
version: string