Skip to content

Commit

Permalink
fix check failed
Browse files Browse the repository at this point in the history
  • Loading branch information
pompurin404 committed Aug 3, 2024
1 parent 9f1dadb commit 07a9b07
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/main/core/manager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChildProcess, execSync, spawn } from 'child_process'
import { ChildProcess, execFileSync, execSync, spawn } from 'child_process'
import {
logPath,
mihomoCorePath,
Expand Down Expand Up @@ -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()])
}
2 changes: 1 addition & 1 deletion src/renderer/src/components/logs/log-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/types.d.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 07a9b07

Please sign in to comment.