mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-10 20:46:09 +00:00
docs: document cli command runtimes
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// Node-host daemon lifecycle commands for install, status, start, stop, and restart.
|
||||
import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce";
|
||||
import { colorize } from "../../../packages/terminal-core/src/theme.js";
|
||||
import { buildNodeInstallPlan } from "../../commands/node-daemon-install-helpers.js";
|
||||
@@ -78,6 +79,7 @@ function resolveNodeDefaults(
|
||||
opts: NodeDaemonInstallOptions,
|
||||
config: Awaited<ReturnType<typeof loadNodeHostConfig>>,
|
||||
) {
|
||||
// CLI flags override node-host config; missing values fall back to loopback Gateway defaults.
|
||||
const host = normalizeOptionalString(opts.host) || config?.gateway?.host || "127.0.0.1";
|
||||
const portOverride = parsePort(opts.port);
|
||||
if (opts.port !== undefined && portOverride === null) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Commander registration for foreground node host and node service lifecycle commands.
|
||||
import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce";
|
||||
import type { Command } from "commander";
|
||||
import { formatDocsLink } from "../../../packages/terminal-core/src/links.js";
|
||||
@@ -18,6 +19,7 @@ import {
|
||||
} from "./daemon.js";
|
||||
|
||||
function parsePortOption(value: unknown, fallback: number): number | null {
|
||||
// Undefined keeps config/default port; invalid explicit input returns null for CLI errors.
|
||||
if (value === undefined) {
|
||||
return fallback;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user