refactor: centralize daemon path resolution

This commit is contained in:
Peter Steinberger committed 2026-01-15 23:19:52 +00:00
1 parent 4a99b9b651
commit db9be87d94
9 files changed
+130 -56

No files matched your search

+9
View File
@@ -58,6 +58,15 @@ describe("resolveTaskScriptPath", () => {
);
});
it("prefers CLAWDBOT_STATE_DIR over profile-derived defaults", () => {
const env = {
USERPROFILE: "C:\\Users\\test",
CLAWDBOT_PROFILE: "rescue",
CLAWDBOT_STATE_DIR: "C:\\State\\clawdbot",
};
expect(resolveTaskScriptPath(env)).toBe(path.join("C:\\State\\clawdbot", "gateway.cmd"));
});
it("handles case-insensitive 'Default' profile", () => {
const env = { USERPROFILE: "C:\\Users\\test", CLAWDBOT_PROFILE: "Default" };
expect(resolveTaskScriptPath(env)).toBe(