From 64a0e6c39300a2e4e8928f7557198f33588cb2be Mon Sep 17 00:00:00 2001 From: yetone Date: Tue, 6 Oct 2026 13:32:03 +0800 Subject: [PATCH] =?UTF-8?q?library=20tests:=20TestAgentsSkillsFolders=20gi?= =?UTF-8?q?ves=20Alma=20a=20data=20folder=20on=20Windows=20(#973)=20?= =?UTF-8?q?=E2=80=94=20sandbox=20clears=20APPDATA,=20so=20os.UserConfigDir?= =?UTF-8?q?=20failed=20there:=20Alma=20(whose=20data=20folder=20is=20%APPD?= =?UTF-8?q?ATA%\alma)=20was=20never=20there,=20and=20the=20test's=20MkdirA?= =?UTF-8?q?ll=20made=20an=20"alma"=20folder=20in=20the=20working=20directo?= =?UTF-8?q?ry.=20The=20test=20now=20sets=20APPDATA=20in=20its=20sandbox,?= =?UTF-8?q?=20and=20puts=20Goose's=20config=20where=20Goose=20reads=20it?= =?UTF-8?q?=20on=20Windows=20(%APPDATA%\Block\goose\config),=20as=20Alma?= =?UTF-8?q?=20reads=20the=20shared=20folder=20Goose's=20skills=20are=20in.?= =?UTF-8?q?=20No=20app=20change.=20Passes=20on=20the=20Windows=20box=20wit?= =?UTF-8?q?h=20and=20without=20the=20symlink=20privilege,=20and=20on=20the?= =?UTF-8?q?=20Mac.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/library/agent_skills_test.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/internal/library/agent_skills_test.go b/internal/library/agent_skills_test.go index 5024375a2..afb5a7754 100644 --- a/internal/library/agent_skills_test.go +++ b/internal/library/agent_skills_test.go @@ -42,8 +42,17 @@ func TestAgentsSkillsFolders(t *testing.T) { t.Errorf("kimi with ~/.config/agents/skills: %+v", tg) } // Alma, there once it has its data folder, reads ~/.config/alma/skills - // on every system, and Claude Code's, Codex's and the shared ones (#824) - cfg, _ := os.UserConfigDir() + // on every system, and Claude Code's, Codex's and the shared ones (#824). + // Its data folder on Windows is under %APPDATA%, which sandbox clears: + // without one there is no Alma there. Goose's config moves there with + // it, so Goose is there too + app := filepath.Join(h, "AppData", "Roaming") + t.Setenv("APPDATA", app) + write(t, filepath.Join(app, "Block", "goose", "config", "config.yaml"), "") + cfg, err := os.UserConfigDir() + if err != nil { + t.Fatal(err) + } os.MkdirAll(filepath.Join(cfg, "alma"), 0o755) if tg := targetByID("alma"); tg == nil || tg.Skills != filepath.Join(h, ".config/alma/skills") || !slices.Contains(tg.SkillsAlso, "claude") || !slices.Contains(tg.SkillsAlso, "codex") || !slices.Contains(tg.SkillsAlso, "goose") {