mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 12:50:35 +00:00
fix: improve daemon node selection
This commit is contained in:
@@ -13,8 +13,9 @@ import {
|
||||
} from "../daemon/legacy.js";
|
||||
import { resolveGatewayProgramArguments } from "../daemon/program-args.js";
|
||||
import {
|
||||
renderSystemNodeWarning,
|
||||
resolvePreferredNodePath,
|
||||
resolveSystemNodePath,
|
||||
resolveSystemNodeInfo,
|
||||
} from "../daemon/runtime-paths.js";
|
||||
import { resolveGatewayService } from "../daemon/service.js";
|
||||
import {
|
||||
@@ -183,10 +184,13 @@ export async function maybeRepairGatewayServiceConfig(
|
||||
command,
|
||||
});
|
||||
const needsNodeRuntime = needsNodeRuntimeMigration(audit.issues);
|
||||
const systemNodePath = needsNodeRuntime
|
||||
? await resolveSystemNodePath(process.env)
|
||||
const systemNodeInfo = needsNodeRuntime
|
||||
? await resolveSystemNodeInfo({ env: process.env })
|
||||
: null;
|
||||
const systemNodePath = systemNodeInfo?.supported ? systemNodeInfo.path : null;
|
||||
if (needsNodeRuntime && !systemNodePath) {
|
||||
const warning = renderSystemNodeWarning(systemNodeInfo);
|
||||
if (warning) note(warning, "Gateway runtime");
|
||||
note(
|
||||
"System Node 22+ not found. Install via Homebrew/apt/choco and rerun doctor to migrate off Bun/version managers.",
|
||||
"Gateway runtime",
|
||||
|
||||
Reference in New Issue
Block a user