fix(setup): reject invalid OMP profiles before fallback writes (#1562)

This commit is contained in:
Ysopwnable
2026-10-10 22:11:14 +08:00
committed by GitHub
parent a53689c55d
commit e4cc0f09de
6 changed files with 638 additions and 30 deletions
@@ -56,7 +56,7 @@ describe("OMP configuration paths", () => {
expect(ompPath({ OMP_PROFILE: "", PI_PROFILE: "legacy" })?.configPath).toBe(
"/home/a/.omp/agent/mcp.json",
);
for (const profile of ["default", " ", "Bad Name", "trailing."])
for (const profile of ["default", " "])
expect(ompPath({ OMP_PROFILE: profile })?.configPath).toBe(
"/home/a/.omp/agent/mcp.json",
);