@@ -51,8 +51,8 @@ function makeFakeClaudeBinary(dir: string) {
5151 " exit 4" ,
5252 " }" ,
5353 "fi" ,
54- 'if [ -n "$T3_FAKE_CLAUDE_HOME_MUST_BE " ] && [ "$HOME " != "$T3_FAKE_CLAUDE_HOME_MUST_BE " ]; then' ,
55- ' printf "%s\\n" "HOME was $HOME " >&2' ,
54+ 'if [ -n "$T3_FAKE_CLAUDE_CONFIG_DIR_MUST_BE " ] && [ "$CLAUDE_CONFIG_DIR " != "$T3_FAKE_CLAUDE_CONFIG_DIR_MUST_BE " ]; then' ,
55+ ' printf "%s\\n" "CLAUDE_CONFIG_DIR was $CLAUDE_CONFIG_DIR " >&2' ,
5656 " exit 5" ,
5757 "fi" ,
5858 'if [ -n "$T3_FAKE_CLAUDE_STDERR" ]; then' ,
@@ -76,7 +76,7 @@ function withFakeClaudeEnv<A, E, R>(
7676 argsMustContain ?: string ;
7777 argsMustNotContain ?: string ;
7878 stdinMustContain ?: string ;
79- homeMustBe ?: string ;
79+ configDirMustBe ?: string ;
8080 claudeConfig ?: Partial < ClaudeSettings > ;
8181 } ,
8282 effectFn : ( textGeneration : TextGeneration . TextGeneration [ "Service" ] ) => Effect . Effect < A , E , R > ,
@@ -92,7 +92,7 @@ function withFakeClaudeEnv<A, E, R>(
9292 const previousArgsMustContain = process . env . T3_FAKE_CLAUDE_ARGS_MUST_CONTAIN ;
9393 const previousArgsMustNotContain = process . env . T3_FAKE_CLAUDE_ARGS_MUST_NOT_CONTAIN ;
9494 const previousStdinMustContain = process . env . T3_FAKE_CLAUDE_STDIN_MUST_CONTAIN ;
95- const previousHomeMustBe = process . env . T3_FAKE_CLAUDE_HOME_MUST_BE ;
95+ const previousConfigDirMustBe = process . env . T3_FAKE_CLAUDE_CONFIG_DIR_MUST_BE ;
9696
9797 yield * Effect . acquireRelease (
9898 Effect . sync ( ( ) => {
@@ -129,10 +129,10 @@ function withFakeClaudeEnv<A, E, R>(
129129 delete process . env . T3_FAKE_CLAUDE_STDIN_MUST_CONTAIN ;
130130 }
131131
132- if ( input . homeMustBe !== undefined ) {
133- process . env . T3_FAKE_CLAUDE_HOME_MUST_BE = input . homeMustBe ;
132+ if ( input . configDirMustBe !== undefined ) {
133+ process . env . T3_FAKE_CLAUDE_CONFIG_DIR_MUST_BE = input . configDirMustBe ;
134134 } else {
135- delete process . env . T3_FAKE_CLAUDE_HOME_MUST_BE ;
135+ delete process . env . T3_FAKE_CLAUDE_CONFIG_DIR_MUST_BE ;
136136 }
137137 } ) ,
138138 ( ) =>
@@ -175,10 +175,10 @@ function withFakeClaudeEnv<A, E, R>(
175175 process . env . T3_FAKE_CLAUDE_STDIN_MUST_CONTAIN = previousStdinMustContain ;
176176 }
177177
178- if ( previousHomeMustBe === undefined ) {
179- delete process . env . T3_FAKE_CLAUDE_HOME_MUST_BE ;
178+ if ( previousConfigDirMustBe === undefined ) {
179+ delete process . env . T3_FAKE_CLAUDE_CONFIG_DIR_MUST_BE ;
180180 } else {
181- process . env . T3_FAKE_CLAUDE_HOME_MUST_BE = previousHomeMustBe ;
181+ process . env . T3_FAKE_CLAUDE_CONFIG_DIR_MUST_BE = previousConfigDirMustBe ;
182182 }
183183 } ) ,
184184 ) ;
@@ -286,10 +286,10 @@ it.layer(ClaudeTextGenerationTestLayer)("ClaudeTextGeneration", (it) => {
286286 ) ,
287287 ) ;
288288
289- it . effect ( "runs Claude text generation with the configured Claude HOME " , ( ) =>
289+ it . effect ( "runs Claude text generation with the configured CLAUDE_CONFIG_DIR " , ( ) =>
290290 Effect . gen ( function * ( ) {
291291 const path = yield * Path . Path ;
292- const claudeHome = path . join ( process . cwd ( ) , ".claude-work-test" ) ;
292+ const claudeConfigDir = path . join ( process . cwd ( ) , ".claude-work-test" ) ;
293293 return yield * withFakeClaudeEnv (
294294 {
295295 // @effect -diagnostics-next-line preferSchemaOverJson:off
@@ -298,8 +298,8 @@ it.layer(ClaudeTextGenerationTestLayer)("ClaudeTextGeneration", (it) => {
298298 title : "Use Claude home" ,
299299 } ,
300300 } ) ,
301- homeMustBe : claudeHome ,
302- claudeConfig : { homePath : claudeHome } ,
301+ configDirMustBe : claudeConfigDir ,
302+ claudeConfig : { homePath : claudeConfigDir } ,
303303 } ,
304304 ( textGeneration ) =>
305305 Effect . gen ( function * ( ) {
0 commit comments