fix: resolve formatting and test issues from OpenClaw rebrand
- Fix formatting in src/commands/onboard-helpers.ts (indentation) - Update paths.test.ts to expect 16 config candidates (backward compatibility) - New: ~/.openclaw + legacy: ~/.clawdbot, ~/.moltbot, ~/.moldbot - Each dir checks 4 config filenames (openclaw.json + 3 legacy) - Total: 4 dirs × 4 filenames = 16 candidates
This commit is contained in:
parent
f3aaa114ad
commit
1791308cc9
@ -64,12 +64,12 @@ export function randomToken(): string {
|
||||
|
||||
export function printWizardHeader(runtime: RuntimeEnv) {
|
||||
const header = [
|
||||
"▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄",
|
||||
"██░▄▄▄░██░▄▄░██░▄▄▄██░▀██░██░▄▄▀██░████░▄▄▀██░███░██",
|
||||
"██░███░██░▀▀░██░▄▄▄██░█░█░██░█████░████░▀▀░██░█░█░██",
|
||||
"██░▀▀▀░██░█████░▀▀▀██░██▄░██░▀▀▄██░▀▀░█░██░██▄▀▄▀▄██",
|
||||
"▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀",
|
||||
" 🦞 OPENCLAW 🦞 ",
|
||||
"▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄",
|
||||
"██░▄▄▄░██░▄▄░██░▄▄▄██░▀██░██░▄▄▀██░████░▄▄▀██░███░██",
|
||||
"██░███░██░▀▀░██░▄▄▄██░█░█░██░█████░████░▀▀░██░█░█░██",
|
||||
"██░▀▀▀░██░█████░▀▀▀██░██▄░██░▀▀▄██░▀▀░█░██░██▄▀▄▀▄██",
|
||||
"▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀",
|
||||
" 🦞 OPENCLAW 🦞 ",
|
||||
" ",
|
||||
].join("\n");
|
||||
runtime.log(header);
|
||||
|
||||
@ -49,7 +49,13 @@ describe("state + config path candidates", () => {
|
||||
const home = "/home/test";
|
||||
const candidates = resolveDefaultConfigCandidates({} as NodeJS.ProcessEnv, () => home);
|
||||
expect(candidates[0]).toBe(path.join(home, ".openclaw", "openclaw.json"));
|
||||
expect(candidates).toHaveLength(1);
|
||||
// Should include new .openclaw dir + legacy dirs (.clawdbot, .moltbot, .moldbot)
|
||||
// with all config filenames (openclaw.json + clawdbot.json, moltbot.json, moldbot.json)
|
||||
// = 4 dirs × 4 filenames = 16 candidates
|
||||
expect(candidates).toHaveLength(16);
|
||||
// Verify the candidates include expected legacy paths
|
||||
expect(candidates).toContain(path.join(home, ".clawdbot", "clawdbot.json"));
|
||||
expect(candidates).toContain(path.join(home, ".moltbot", "moltbot.json"));
|
||||
});
|
||||
|
||||
it("prefers ~/.openclaw when it exists and legacy dir is missing", async () => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user