fix(workspace): align clawd + bootstrap

This commit is contained in:
Peter Steinberger committed 2026-01-06 19:54:50 +01:00
1 parent bdf597eb95
commit d07e78855c
13 files changed
+105 -33

No files matched your search

+13
View File
@@ -36,4 +36,17 @@ describe("ensureAgentWorkspace", () => {
await ensureAgentWorkspace({ dir, ensureBootstrapFiles: true });
expect(await fs.readFile(agentsPath, "utf-8")).toBe("custom");
});
it("does not recreate BOOTSTRAP.md once workspace exists", async () => {
const dir = await fs.mkdtemp(path.join(os.tmpdir(), "clawdbot-ws-"));
const agentsPath = path.join(dir, "AGENTS.md");
const bootstrapPath = path.join(dir, "BOOTSTRAP.md");
await fs.writeFile(agentsPath, "custom", "utf-8");
await fs.rm(bootstrapPath, { force: true });
await ensureAgentWorkspace({ dir, ensureBootstrapFiles: true });
await expect(fs.stat(bootstrapPath)).rejects.toBeDefined();
});
});