mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 20:17:45 +00:00
fix(auth): show command checks unified config for accounts
Use getAllProfilesMerged() and getDefaultResolved() to check both unified config and legacy profiles when showing account details. Fixes #458
This commit is contained in:
@@ -26,8 +26,13 @@ export async function handleShow(ctx: CommandContext, args: string[]): Promise<v
|
||||
}
|
||||
|
||||
try {
|
||||
const profile = ctx.registry.getProfile(profileName);
|
||||
const defaultProfile = ctx.registry.getDefaultProfile();
|
||||
// Use merged profiles (checks unified config first, falls back to legacy)
|
||||
const allProfiles = ctx.registry.getAllProfilesMerged();
|
||||
const profile = allProfiles[profileName];
|
||||
if (!profile) {
|
||||
exitWithError(`Profile not found: ${profileName}`, ExitCode.PROFILE_ERROR);
|
||||
}
|
||||
const defaultProfile = ctx.registry.getDefaultResolved();
|
||||
const isDefault = profileName === defaultProfile;
|
||||
const instancePath = ctx.instanceMgr.getInstancePath(profileName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user