mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 05:00:30 +08:00
fix check failed
This commit is contained in:
parent
dd7134c389
commit
deeaa5933d
@ -1,4 +1,4 @@
|
|||||||
import { ChildProcess, execSync, spawn } from 'child_process'
|
import { ChildProcess, execFileSync, execSync, spawn } from 'child_process'
|
||||||
import {
|
import {
|
||||||
logPath,
|
logPath,
|
||||||
mihomoCorePath,
|
mihomoCorePath,
|
||||||
@ -50,13 +50,11 @@ export function restartCore(): void {
|
|||||||
startCore()
|
startCore()
|
||||||
}
|
}
|
||||||
|
|
||||||
// mihomo -t -d path return status code
|
|
||||||
export function checkProfile(): void {
|
export function checkProfile(): void {
|
||||||
const corePath = mihomoCorePath(getAppConfig().core ?? 'mihomo')
|
const corePath = mihomoCorePath(getAppConfig().core ?? 'mihomo')
|
||||||
generateProfile()
|
|
||||||
if (process.platform !== 'win32') {
|
if (process.platform !== 'win32') {
|
||||||
execSync(`chmod +x ${corePath}`)
|
execSync(`chmod +x ${corePath}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
execSync(`${corePath} -t -f ${mihomoWorkConfigPath()} -d ${mihomoTestDir()}`)
|
execFileSync(corePath, ['-t', '-f', mihomoWorkConfigPath(), '-d', mihomoTestDir()])
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,7 @@ const LogItem: React.FC<IMihomoLogInfo> = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
<small className="text-default-500">{time}</small>
|
<small className="text-default-500">{time}</small>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardBody className="pt-0">{payload}</CardBody>
|
<CardBody className="pt-0 text-sm">{payload}</CardBody>
|
||||||
</Card>
|
</Card>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
2
src/shared/types.d.ts
vendored
2
src/shared/types.d.ts
vendored
@ -1,5 +1,5 @@
|
|||||||
type OutboundMode = 'rule' | 'global' | 'direct'
|
type OutboundMode = 'rule' | 'global' | 'direct'
|
||||||
type LogLevel = 'info' | 'debug' | 'warn' | 'error' | 'silent'
|
type LogLevel = 'info' | 'debug' | 'warning' | 'error' | 'silent'
|
||||||
type SysProxyMode = 'auto' | 'manual'
|
type SysProxyMode = 'auto' | 'manual'
|
||||||
interface IMihomoVersion {
|
interface IMihomoVersion {
|
||||||
version: string
|
version: string
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user