feat: prepare Zhinian desktop pilot
This commit is contained in:
@@ -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',
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user