chore: format
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import { describe, expect, it, beforeEach } from "vitest";
|
||||
|
||||
import type { ClawdbotConfig } from "./types.js";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
import {
|
||||
applyConfigOverrides,
|
||||
getConfigOverrides,
|
||||
@@ -8,6 +6,7 @@ import {
|
||||
setConfigOverride,
|
||||
unsetConfigOverride,
|
||||
} from "./runtime-overrides.js";
|
||||
import type { ClawdbotConfig } from "./types.js";
|
||||
|
||||
describe("runtime overrides", () => {
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -81,13 +81,19 @@ export function resetConfigOverrides(): void {
|
||||
overrides = {};
|
||||
}
|
||||
|
||||
export function setConfigOverride(pathRaw: string, value: unknown): {
|
||||
export function setConfigOverride(
|
||||
pathRaw: string,
|
||||
value: unknown,
|
||||
): {
|
||||
ok: boolean;
|
||||
error?: string;
|
||||
} {
|
||||
const path = parsePath(pathRaw);
|
||||
if (!path) {
|
||||
return { ok: false, error: "Invalid path. Use dot notation (e.g. foo.bar)." };
|
||||
return {
|
||||
ok: false,
|
||||
error: "Invalid path. Use dot notation (e.g. foo.bar).",
|
||||
};
|
||||
}
|
||||
setOverrideAtPath(overrides, path, value);
|
||||
return { ok: true };
|
||||
|
||||
Reference in New Issue
Block a user