feat: prepare Zhinian desktop pilot
Some checks failed
Electron E2E / Electron E2E (macos-latest) (push) Has been cancelled
Electron E2E / Electron E2E (ubuntu-latest) (push) Has been cancelled
Electron E2E / Electron E2E (windows-latest) (push) Has been cancelled

This commit is contained in:
inman
2026-05-07 21:49:20 +08:00
parent cddaf37016
commit 0abc48189c
103 changed files with 10975 additions and 2049 deletions

View File

@@ -277,6 +277,8 @@ export async function runOpenClawDoctorRepair(): Promise<boolean> {
? path.join(process.resourcesPath, 'bin')
: path.join(process.cwd(), 'resources', 'bin', target);
const binPathExists = existsSync(binPath);
const bundledNodePath = path.join(binPath, process.platform === 'win32' ? 'node.exe' : 'node');
const bundledNpmCliPath = path.join(binPath, 'lib', 'node_modules', 'npm', 'bin', 'npm-cli.js');
const baseProcessEnv = process.env as Record<string, string | undefined>;
const baseEnvPatched = binPathExists
? prependPathEntry(baseProcessEnv, binPath).env
@@ -292,6 +294,12 @@ export async function runOpenClawDoctorRepair(): Promise<boolean> {
const forkEnv: Record<string, string | undefined> = {
...baseEnvPatched,
...uvEnv,
...(binPathExists && existsSync(bundledNodePath) && existsSync(bundledNpmCliPath)
? {
YINIAN_NODE_EXEC_PATH: bundledNodePath,
YINIAN_NPM_CLI_PATH: bundledNpmCliPath,
}
: {}),
OPENCLAW_NO_RESPAWN: '1',
};