mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-27 09:21:35 +07:00
fix(cli): precompute bare root help startup path
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { mkdirSync, readdirSync, readFileSync, writeFileSync } from "node:fs";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { renderRootHelpText } from "../src/cli/program/root-help.ts";
|
||||
|
||||
function dedupe(values: string[]): string[] {
|
||||
const seen = new Set<string>();
|
||||
@@ -77,6 +78,7 @@ function readBundledChannelCatalogIds(): string[] {
|
||||
|
||||
const catalog = readBundledChannelCatalogIds();
|
||||
const channelOptions = dedupe([...CORE_CHANNEL_ORDER, ...catalog]);
|
||||
const rootHelpText = renderRootHelpText();
|
||||
|
||||
mkdirSync(distDir, { recursive: true });
|
||||
writeFileSync(
|
||||
@@ -85,6 +87,7 @@ writeFileSync(
|
||||
{
|
||||
generatedBy: "scripts/write-cli-startup-metadata.ts",
|
||||
channelOptions,
|
||||
rootHelpText,
|
||||
},
|
||||
null,
|
||||
2,
|
||||
|
||||
Reference in New Issue
Block a user