mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 04:18:05 +00:00
fix(auth): use unified config for account profile touch in ccs.ts
Account profiles in unified config mode were failing with "Profile not found" because touchProfile() only checked legacy profiles.json. Now checks unified config first with hasAccountUnified() and calls touchAccountUnified() when the profile exists there, falling back to legacy touchProfile() otherwise. Fixes #98
This commit is contained in:
+6
-2
@@ -397,8 +397,12 @@ async function main(): Promise<void> {
|
||||
// Ensure instance exists (lazy init if needed)
|
||||
const instancePath = instanceMgr.ensureInstance(profileInfo.name);
|
||||
|
||||
// Update last_used timestamp
|
||||
registry.touchProfile(profileInfo.name);
|
||||
// Update last_used timestamp (check unified config first, fallback to legacy)
|
||||
if (registry.hasAccountUnified(profileInfo.name)) {
|
||||
registry.touchAccountUnified(profileInfo.name);
|
||||
} else {
|
||||
registry.touchProfile(profileInfo.name);
|
||||
}
|
||||
|
||||
// Execute Claude with instance isolation
|
||||
const envVars: NodeJS.ProcessEnv = { CLAUDE_CONFIG_DIR: instancePath };
|
||||
|
||||
Reference in New Issue
Block a user