@@ -21,6 +21,7 @@ func TestHasDatabricksSkillsInstalledNoAgents(t *testing.T) {
2121func TestHasDatabricksSkillsInstalledCanonicalOnly (t * testing.T ) {
2222 tmpHome := t .TempDir ()
2323 t .Setenv ("HOME" , tmpHome )
24+ t .Setenv ("USERPROFILE" , tmpHome )
2425 require .NoError (t , os .MkdirAll (filepath .Join (tmpHome , CanonicalSkillsDir , "databricks" ), 0o755 ))
2526
2627 origRegistry := Registry
@@ -39,6 +40,7 @@ func TestHasDatabricksSkillsInstalledCanonicalOnly(t *testing.T) {
3940func TestHasDatabricksSkillsInstalledIgnoresAgentDir (t * testing.T ) {
4041 tmpHome := t .TempDir ()
4142 t .Setenv ("HOME" , tmpHome )
43+ t .Setenv ("USERPROFILE" , tmpHome )
4244 // Skills in agent dir only (e.g., installed by another tool) should not count.
4345 agentDir := filepath .Join (tmpHome , ".claude" )
4446 require .NoError (t , os .MkdirAll (filepath .Join (agentDir , "skills" , "databricks" ), 0o755 ))
@@ -59,6 +61,7 @@ func TestHasDatabricksSkillsInstalledIgnoresAgentDir(t *testing.T) {
5961func TestHasDatabricksSkillsInstalledWithOnlyNonDatabricksSkills (t * testing.T ) {
6062 tmpDir := t .TempDir ()
6163 t .Setenv ("HOME" , tmpDir )
64+ t .Setenv ("USERPROFILE" , tmpDir )
6265 // Non-databricks skills should not count.
6366 require .NoError (t , os .MkdirAll (filepath .Join (tmpDir , "skills" , "mcp-builder" ), 0o755 ))
6467 require .NoError (t , os .MkdirAll (filepath .Join (tmpDir , "skills" , "rust-webapp" ), 0o755 ))
@@ -79,6 +82,7 @@ func TestHasDatabricksSkillsInstalledWithOnlyNonDatabricksSkills(t *testing.T) {
7982func TestHasDatabricksSkillsInstalledNoSkillsDir (t * testing.T ) {
8083 tmpDir := t .TempDir ()
8184 t .Setenv ("HOME" , tmpDir )
85+ t .Setenv ("USERPROFILE" , tmpDir )
8286
8387 origRegistry := Registry
8488 Registry = []Agent {
@@ -96,6 +100,7 @@ func TestHasDatabricksSkillsInstalledNoSkillsDir(t *testing.T) {
96100func TestHasDatabricksSkillsInstalledCustomSubdirNotChecked (t * testing.T ) {
97101 tmpHome := t .TempDir ()
98102 t .Setenv ("HOME" , tmpHome )
103+ t .Setenv ("USERPROFILE" , tmpHome )
99104 // Skills in agent's custom subdir should not count — only canonical matters.
100105 require .NoError (t , os .MkdirAll (filepath .Join (tmpHome , ".gemini" , "antigravity" , "global_skills" , "databricks" ), 0o755 ))
101106
@@ -116,6 +121,7 @@ func TestHasDatabricksSkillsInstalledCustomSubdirNotChecked(t *testing.T) {
116121func TestHasDatabricksSkillsInstalledDatabricksAppsCanonical (t * testing.T ) {
117122 tmpHome := t .TempDir ()
118123 t .Setenv ("HOME" , tmpHome )
124+ t .Setenv ("USERPROFILE" , tmpHome )
119125 // databricks-apps prefix should match in canonical location.
120126 require .NoError (t , os .MkdirAll (filepath .Join (tmpHome , CanonicalSkillsDir , "databricks-apps" ), 0o755 ))
121127
@@ -138,6 +144,7 @@ func TestHasDatabricksSkillsInstalledDatabricksAppsCanonical(t *testing.T) {
138144func TestHasDatabricksSkillsInstalledLegacyPath (t * testing.T ) {
139145 tmpHome := t .TempDir ()
140146 t .Setenv ("HOME" , tmpHome )
147+ t .Setenv ("USERPROFILE" , tmpHome )
141148 // Skills only in the legacy location should still be detected.
142149 require .NoError (t , os .MkdirAll (filepath .Join (tmpHome , legacySkillsDir , "databricks" ), 0o755 ))
143150
0 commit comments