mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-10-21 05:23:19 +00:00
Merge pull request #1172 from avs-io/codex/fix-claude-keychain-test-isolation
fix: isolate overridden Claude credential homes
This commit is contained in:
commit
fcbe978206
1 changed files with 5 additions and 0 deletions
|
|
@ -249,6 +249,10 @@ enum ClaudeCredentialStore {
|
|||
|
||||
private static func readClaudeSourceSilently() -> CredentialRecord? {
|
||||
if let fromFile = try? readClaudeFile() { return fromFile }
|
||||
// An overridden home is an isolation boundary (tests and explicit
|
||||
// sandboxed probes). Falling through here would read the operator's
|
||||
// login Keychain when the isolated fixture has no Claude file.
|
||||
guard homeDirectoryOverride == nil else { return nil }
|
||||
if let fromKeychain = try? readClaudeKeychain(allowUI: false) { return fromKeychain }
|
||||
return nil
|
||||
}
|
||||
|
|
@ -261,6 +265,7 @@ enum ClaudeCredentialStore {
|
|||
|
||||
private static func readClaudeSource() throws -> CredentialRecord {
|
||||
if let silent = readClaudeSourceSilently() { return silent }
|
||||
guard homeDirectoryOverride == nil else { throw StoreError.bootstrapNoSource }
|
||||
if let fromKeychain = try readClaudeKeychain(allowUI: true) { return fromKeychain }
|
||||
throw StoreError.bootstrapNoSource
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue