mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-30 06:53:39 +00:00
fix(cli): preserve command option state
This commit is contained in:
@@ -48,7 +48,7 @@ export function registerNodeCli(program: Command) {
|
||||
.description("Run the headless node host (foreground)")
|
||||
.option("--host <host>", "Gateway host")
|
||||
.option("--port <port>", "Gateway port")
|
||||
.option("--tls", "Use TLS for the gateway connection", false)
|
||||
.option("--tls", "Use TLS for the gateway connection")
|
||||
.option("--tls-fingerprint <sha256>", "Expected TLS certificate fingerprint (sha256)")
|
||||
.option("--node-id <id>", "Override node id (clears pairing token)")
|
||||
.option("--display-name <name>", "Override node display name")
|
||||
@@ -67,8 +67,12 @@ export function registerNodeCli(program: Command) {
|
||||
await runNodeHost({
|
||||
gatewayHost: host,
|
||||
gatewayPort: port,
|
||||
gatewayTls: Boolean(opts.tls) || Boolean(opts.tlsFingerprint),
|
||||
gatewayTlsFingerprint: opts.tlsFingerprint,
|
||||
gatewayTls:
|
||||
typeof opts.tls === "boolean"
|
||||
? opts.tls
|
||||
: Boolean(opts.tlsFingerprint ?? existing?.gateway?.tlsFingerprint) ||
|
||||
existing?.gateway?.tls,
|
||||
gatewayTlsFingerprint: opts.tlsFingerprint ?? existing?.gateway?.tlsFingerprint,
|
||||
nodeId: opts.nodeId,
|
||||
displayName: opts.displayName,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user