mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-03 07:20:21 +00:00
fix: repair latest-main ci gate
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
import { getCommandPathWithRootOptions } from "../cli/argv.js";
|
||||
import { loadConfig, type OpenClawConfig } from "../config/config.js";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import { resolveNodeRequireFromMeta } from "./node-require.js";
|
||||
|
||||
type LoggingConfig = OpenClawConfig["logging"];
|
||||
|
||||
const requireConfig = resolveNodeRequireFromMeta(import.meta.url);
|
||||
|
||||
export function shouldSkipMutatingLoggingConfigRead(argv: string[] = process.argv): boolean {
|
||||
const [primary, secondary] = getCommandPathWithRootOptions(argv, 2);
|
||||
return primary === "config" && (secondary === "schema" || secondary === "validate");
|
||||
@@ -13,7 +16,12 @@ export function readLoggingConfig(): LoggingConfig | undefined {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
const parsed = loadConfig();
|
||||
const loaded = requireConfig?.("../config/config.js") as
|
||||
| {
|
||||
loadConfig?: () => OpenClawConfig;
|
||||
}
|
||||
| undefined;
|
||||
const parsed = loaded?.loadConfig?.();
|
||||
const logging = parsed?.logging;
|
||||
if (!logging || typeof logging !== "object" || Array.isArray(logging)) {
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user