fix: improve daemon node selection

This commit is contained in:
Peter Steinberger
2026-01-12 08:33:28 +00:00
parent 1f63ee565f
commit 7db1cbe178
9 changed files with 268 additions and 10 deletions

View File

@@ -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",