优化一些bug

This commit is contained in:
24kycj
2026-05-27 00:17:13 +08:00
parent 79174e7e03
commit 22b17aed35
48 changed files with 1529 additions and 388 deletions
+6 -2
View File
@@ -83,6 +83,10 @@ export function setupNativeWorkingDir(): void {
}
ensureBundledConfig(nativeDir)
deployRuntimeConfigs(nativeDir)
process.chdir(nativeDir)
log.debug(`Native working directory: ${nativeDir}`)
const execDir = getProcessExecDir()
const pathHead = [nativeDir, execDir].join(path.delimiter)
if (!process.env.PATH?.toLowerCase().includes(nativeDir.toLowerCase())) {
process.env.PATH = `${pathHead}${path.delimiter}${process.env.PATH || ''}`
}
log.debug(`Native DLL search path: ${nativeDir}; cwd kept at ${process.cwd()}`)
}